AnotherAlan
Technical User
Hi all,
Is it possible to insert more than one string with sed.
i.e Something like;
sed '$i\
`cat /tmp/test/ng_pass` ' /tmp/test/pass_test > /tmp/test/pass_test.updated
I would like to insert the contents of a file / variable.
In this case the file ng_pass contains 2 lines;
UK
US
I have dynamic entries and the contents of ng_pass may vary from 1 to 4 different lines that need inserting.
At the moment I have tried with files and variables but cannot get the syntax correct.
Any help appreciated.
Thanks
Alan
Is it possible to insert more than one string with sed.
i.e Something like;
sed '$i\
`cat /tmp/test/ng_pass` ' /tmp/test/pass_test > /tmp/test/pass_test.updated
I would like to insert the contents of a file / variable.
In this case the file ng_pass contains 2 lines;
UK
US
I have dynamic entries and the contents of ng_pass may vary from 1 to 4 different lines that need inserting.
At the moment I have tried with files and variables but cannot get the syntax correct.
Any help appreciated.
Thanks
Alan