Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 10:16 PM
07-30-2002 10:16 PM
How could I pass an argument to a sed ?
INS=`cat failed.log8|awk '{print $1}'`
sed -e 's/$/ $INS/g' failed.log3 > failed.log4
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 11:02 PM
07-30-2002 11:02 PM
Re: sed
Have attached some examples someone gave me..
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2002 11:08 PM
07-30-2002 11:08 PM
Re: sed
try
sed -e "s/$/ $INS/g" failed.log3 > failed.log4
Steve Steel
See
http://www.unet.univie.ac.at/aix/cmds/aixcmds5/sed.htm
copy an existing file (oldfile) to a new file (newfile) and replace all occurrences of the testpattern text string with the contents of the $REPL shell variable, enter:
cat oldfile | sed -e "s/testpattern/$REPL/g" > newfile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 12:59 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-31-2002 01:16 AM
07-31-2002 01:16 AM
Re: sed
The explanation can be found in the man page of the shell you are using
Double quotes also interpolate backticks:
l1:/u/usr/merijn/.elvislib 128 > echo "I'm at `pwd` now"
I'm at /u/usr/merijn/.elvislib now
l1:/u/usr/merijn/.elvislib 129 >
And your command can be a single pass:
sed -e 's/$/ '`awk '{print $1}' < failed.log8`'/' failed.log3 >failed.log4