- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- usage of sed
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
Discussions
Discussions
Forums
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
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
тАО10-04-2004 11:51 PM
тАО10-04-2004 11:51 PM
usage of sed
can I insert a text before each linefeed
in a textfile ?
Which is the correct command ?
Thanks
Ralf
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2004 11:56 PM
тАО10-04-2004 11:56 PM
Re: usage of sed
I think something like this should do it:
sed 's/$/your_text$/'
You may have to experiment a bit with it.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 12:15 AM
тАО10-05-2004 12:15 AM
Re: usage of sed
sed:
sed "s/$/
awk:
awk '{ print $0"
perl:
perl -pe 's/$/
commandline:
while read line; do
echo $line
done < inputfile > outputfile
HTH.
- Tags:
- awk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 12:17 AM
тАО10-05-2004 12:17 AM
Re: usage of sed
Shame on you!
DO NOT PUT THE last $ in your sed string
sed 's/$/your_text/'
otherwise a $ will be in your output (ouch)
Pete, go have some more coffee :-))))))))
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 12:19 AM
тАО10-05-2004 12:19 AM
Re: usage of sed
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 12:26 AM
тАО10-05-2004 12:26 AM
Re: usage of sed
Go thr' this link:
http://www.hk8.org/old_web/unix/sedawk/index.htm
That should help u experiment. :)
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-05-2004 01:00 AM
тАО10-05-2004 01:00 AM
Re: usage of sed
http://www.unixguide.net/unix/sedoneliner.shtml
Rgds...Geoff