Operating System - Tru64 Unix
1753828 Members
8512 Online
108806 Solutions
New Discussion юеВ

Re: calling sed from shell

 
SOLVED
Go to solution
ade_4
New Member

calling sed from shell

Hi,
I am fairly new to unix
I have a shell script calling some xslt transforms. After this I want to call a sed script to do some tidying

/usr/bin/scripts/mySed.sed < in > out

can anyone help me with the correct syntax for calling a sed script from my shell script

thanks
2 REPLIES 2
Hein van den Heuvel
Honored Contributor
Solution

Re: calling sed from shell


I've never done this before, but accordign to the man page you should use:

sed -f /usr/bin/scripts/mySed.sed in > out


Good Luck,
Hein.


man sed
:
sed [-n] [-e script]... [-f script_file...]... [file...]
:
EXAMPLES

1. To perform a global change, enter:
sed "s/happy/enchanted/g" chap1 > chap1.new

ade_4
New Member

Re: calling sed from shell

thanks very much
that does the trick