- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Managing variables -very important
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-2009 02:55 AM
тАО10-04-2009 02:55 AM
Managing variables -very important
I have an operations which give the output in a variable $out
I want to send this output by e-mail, so guys know that the job has been finished.
Simply, i need to write the variable $out to a file, after that i can send it by e-mail.
Can you please help with this?
thanks
- Tags:
- variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 03:00 AM
тАО10-04-2009 03:00 AM
Re: Managing variables -very important
echo "Output of operation is <${out}>" | mailx -s "Output of operation" my.email@myaddress.com
Won't that do?
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 03:02 AM
тАО10-04-2009 03:02 AM
Re: Managing variables -very important
can i write this output to a .txt file or .csv file??
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 03:31 AM
тАО10-04-2009 03:31 AM
Re: Managing variables -very important
echo ${out} > /tmp/myfile.txt
cat /tmp/myfile.txt | mailx -s "Output of operation" my.email@myaddress.com
To a CSV file??? what are you trying to put in comma delimited format??
Maybe you need tyo define your problem statement a bit further
HTH
Duncan
I am an HPE Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-04-2009 11:48 PM
тАО10-04-2009 11:48 PM
Re: Managing variables -very important
mail myname@myaddr <
Content-Type: application/vnd.ms-excel;
name="t1.csv"
Content-Transfer-Encoding: 7bit
$out
.
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 09:13 PM
тАО10-07-2009 09:13 PM
Re: Managing variables -very important
i am trying to write the variable to that file using command
#echo ${out} > /tmp/myfile.txt
but i got this error msg
Result=ChannelExec;returnResult=ChannelExec;returnCode=-1.............................
what is the channedExec error and how i can solve it?
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 10:41 PM
тАО10-07-2009 10:41 PM
Re: Managing variables -very important
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 11:09 PM
тАО10-07-2009 11:09 PM
Re: Managing variables -very important
Where? On stderr or in tmp/myfile.txt?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 11:19 PM
тАО10-07-2009 11:19 PM
Re: Managing variables -very important
echo "${out}" > /tmp/myfile.txt
The semi-colon (;) ends one shell command and begins another. If your variable contains semi-colons and the variable expansion is not quoted, the first semi-colon will terminate the echo command and the rest of the variable content will be interpreted as shell command(s), most likely causing error messages.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-07-2009 11:25 PM
тАО10-07-2009 11:25 PM
Re: Managing variables -very important
echo "${TAP OUT}" > file02.txt;
but still the same error
!!!!
plz advise