Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
such .sed file?
Name: Jessica Date: January 1, 2003 at 16:29:08 Pacific OS: Solaris6 CPU/Ram: 200
Comment:
Hi,
The guy before processing the reports and change the format using sed, he use like this:
... cat /usr/local/bin/abcd.sed $i > /tmp/$i ...
and I more the abcd.sed and just get two line:
:::::::: (ECONF2) run ECONF2
what's that? Can somebody explain it to me, thanks!
Name: David Perry Date: January 1, 2003 at 16:45:07 Pacific
Reply:
Can you please post a sample of the data. Does the abcd.sed script really only contain --------------------- (ECONF2) run ECONF2 ---------------------
The cat command would append multiple files together.
if the $i is set ( I'm guessing you may be using csh ) then the above would prepend the contents of abcd.sed to a new file created in the tmp directory with the same name as the original file.
0
Response Number 2
Name: Jessica Date: January 3, 2003 at 11:41:26 Pacific
Reply:
Hi,
More specificly, the .sed script is to do some output format before printing them which are copied to /tmp, the following are more details:
cd $REPORTS for i in `/bin/ls -ltr "CNF"* |/bin/nawk '{ print $9 }' ` do cat /usr/local/bin/abc.sed $i > /tmp/$i cd /tmp case $printer in ""|printer1 ) echo "${bold}Requesting $i on printer1. ${offbold}" /usr/local/bin/lpr -P printer1 -l postscript $i;; printer2 ) ..... esac rm -f /tmp/$i 2>&- echo "Press Return to continue\c" && read ans &&return done
And in abc.sed I only find two lines using command more,
Summary: I'm using the -f for the first time. I'd like to use it for multiple replaces to clean a file up. This is the command line sed -f clean.sed test > test.1 this is the sample clean.sed file { s/","/"...
Summary: Can someone help? I'm trying to pass an echo string over to sed in order for sed to insert it into a text file (test) as such: echo "echo "ps -ef | grep `pwd | awk -F/ '{print $5}'`/config | awk '{pr...
Summary: in a sed file I'd like to append the line to another file if it matches and substitutes s/abc/cat/w filename However I don't want it to create a new file for the sed, but append to an existing file ...