Computing.Net > Forums > Unix > such .sed file?

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?

Reply to Message Icon

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!



Sponsored Link
Ads by Google

Response Number 1
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,

::::::::
(ECONF2) run ECONF2

can you follow it and figure it out? thanks!


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: such .sed file?

Creating a sed file www.computing.net/answers/unix/creating-a-sed-file/5958.html

passing echo string over to sed www.computing.net/answers/unix/passing-echo-string-over-to-sed/6190.html

sed \w to append to file www.computing.net/answers/unix/sed-w-to-append-to-file/7400.html