RE: Using the SED Command (Unix) [heur]

RE: Using the SED Command (Unix) [heur]

 

  

Just for laughs, here's an example that gets passed 14 arguments.
It executes a Pro*C program. The true syntax is used and arg 11
has embedded spaces (hence the quotes).

#**********************************************************************
# ba_seg134segs USERNAME SSG1 ESG1 SSG2 ESG2 SSG3 ESG3 SSG4 ESG4
# STARTPGNO MESNO SECTN ORGBRK FNDBRK
#**********************************************************************
#!/bin/ksh
. /oracle/.profile
echo
echo "BA_SEG134SEGS:"
echo
echo "Program Arguments:"
echo "--------------------------------"
echo ${1}
echo ${2}
echo ${3}
echo ${4}
echo ${5}
echo ${6}
echo ${7}
echo ${8}
echo ${9}
echo ${10}
echo "${11}"
echo ${12}
echo ${13}
echo ${14}
echo "--------------------------------"
echo

nohup /dc/MF/bin/ba_seg134segs ${1} ${2} ${3} ${4} ${5} ${6} ${7} ${8}
${9} ${10} "${11}" ${12} ${13} ${14} >> /dc/MF/log/zaction.log 2>&1 &

echo "Program has been submitted."
echo
echo "**** Press ENTER to Continue ****"
echo

exit


-----Original Message-----
From: Edwards Ed
[mailto:oracledba-ezmlmshield-x47709567.[Email address protected]
Sent: Wednesday, May 04, 2005 10:35 AM
To: LazyDBA Discussion
Subject: RE: Using the SED Command (Unix) [heur]

Chris,
Thanks.


-----Original Message-----
From: Chris Hagemaier
[mailto:oracledba-ezmlmshield-x16834400.[Email address protected]
Sent: Wednesday, May 04, 2005 1:24 PM
To: LazyDBA Discussion
Subject: RE: Using the SED Command (Unix) [heur]


Ed-
The simple version...
Put that line in a script (called delines).

Then execute "delines 100"

sed '1,$1d' < test1.txt

$1 will equal 100 ($1 being the first argument).

-----Original Message-----
From: Edwards Ed
[mailto:oracledba-ezmlmshield-x58170981.[Email address protected]
Sent: Wednesday, May 04, 2005 10:11 AM
To: LazyDBA Discussion
Subject: Using the SED Command (Unix)

To All,
I want to delete the first 100 lines out of a text file using sed. I
typed the following sed command:

sed '1,100d' < test1.txt

Does sed allow you to use a variable instead of using the "100"? If
so, how do you use it?



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com To unsubscribe:
see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com By using this list you agree
to these terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us



--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html


--------
website: http://www.LazyDBA.com
Please don't reply to RTFM questions
Oracle documentation is here: http://tahiti.oracle.com
To unsubscribe: see http://www.lazydba.com/unsubscribe.html
To subscribe: see http://www.lazydba.com
By using this list you agree to these
terms:http://www.lazydba.com/legal.html



--
This message has been scanned for viruses and dangerous content by
MailScanner, and is believed to be clean.

Douglas County, Oregon
www.co.douglas.or.us


Oracle LazyDBA home page