- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting
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
- 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
02-26-2002 12:43 PM
02-26-2002 12:43 PM
================================================
#!/bin/sh
cust="cust1 cust2 cust3"
edi_cust1="mailaddress1.com"
edi_cust2="mailaddress2.com"
edi_cust3="mailaddress3.com"
for i in $cust
do
temp="echo edi_cust_$i"
echo $temp
#echo "" | mailx -s "" $temp --- ??????
done
=============================================
What I need to accomplish is basically send an email to all customers listed. "$temp only returns edi_cust1,edi_cust2,edi_cust3.
What I need is the value to the right side of it i.e the email addresses..
How do I accomplish this after getting $temp
Thanks
Krishnan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 01:03 PM
02-26-2002 01:03 PM
Re: Scripting
HTH
mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 01:22 PM
02-26-2002 01:22 PM
Re: Scripting
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 01:36 PM
02-26-2002 01:36 PM
Solution#!/bin/sh
cust="cust1 cust2 cust3"
edi_cust1="mailaddress1.com"
edi_cust2="mailaddress2.com"
edi_cust3="mailaddress3.com"
for i in $cust
do
eval temp=$"edi_$i"
echo $temp
#echo "" | mailx -s "" $temp --- ??????
done
Then just change the mail line to something like:
echo "This is a message" | mailx -s "Subject line" $temp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 01:36 PM
02-26-2002 01:36 PM
Re: Scripting
example-
cust="cust1"
edi_cust1="user@mail.com"
eval temp=`echo \\${edi_$cust}`
Would set temp to user@mail.com.
Note the two \\ ... These are very important!
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 01:37 PM
02-26-2002 01:37 PM
Re: Scripting
Even with single quotes I just get the variable only, not the value to the right side.
Present Output : edi_cust1
edi_cust2
edi_cust3
What I need is : mailaddress1.com
mailaddress2.com
mailaddress3.com
Thanks
Krishnan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2002 01:45 PM
02-26-2002 01:45 PM
Re: Scripting
The "eval" expression worked !!