- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scripting - Printing
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
Forums
Discussions
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
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
05-13-2003 02:35 PM
05-13-2003 02:35 PM
Scripting - Printing
I have output like this
detail1
detail3
detail4
I want to print above output like
echo "Want to print : detail1
detail2
detail3"
I am trying to achieve with whatever scripting I know but I got the output like
echo "Want to print : detail1
detail2
detail3"
Any help is appreciated.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 10:38 PM
05-13-2003 10:38 PM
Re: Scripting - Printing
program_tat_generates_output|
awk '{ printf "Want to print : %s\n", $0}'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2003 11:01 PM
05-13-2003 11:01 PM
Re: Scripting - Printing
i could not understand what exactly u want. but if ur program runs in a loop every time it generates output like
first run
detail1
second run
detail2 ....etc.,
u assign this output to a variable like
tmp=`out put of program`
then in the next line in the loop write
echo "Want to print:$tmp"
Redirect the output of above echo statement to a file if u want.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2003 12:15 AM
05-14-2003 12:15 AM
Re: Scripting - Printing
try with \n inside the echo command:
echo "Want to print:\ndetail1\ndetail3\ndetail4"
Frank.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-14-2003 12:49 AM
05-14-2003 12:49 AM
Re: Scripting - Printing
John