HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- A variable is taken as several parameter given to ...
Operating System - HP-UX
1834200
Members
2712
Online
110066
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
06-01-2006 11:45 AM
06-01-2006 11:45 AM
A variable is taken as several parameter given to a function.
Hi .. I have a function, and it looks like follows when is called:
emails_patito="user1@patito.com user2@patito.com user3@patito.com user4@patito.com"
fun_cel_mail_message 2 $SERVER_name 1001 2001 send $www $emails_patito
Question here is :
why i can not send the message to all people?
i mean, only is taken the first of them or the second of them !!!! why!!! i'm putting them between " " ....
the parameter number 7 probably only take the first because exist a space between them , could be that ? what can i change this one to send to all of them ?
thanks, Manuales.
emails_patito="user1@patito.com user2@patito.com user3@patito.com user4@patito.com"
fun_cel_mail_message 2 $SERVER_name 1001 2001 send $www $emails_patito
Question here is :
why i can not send the message to all people?
i mean, only is taken the first of them or the second of them !!!! why!!! i'm putting them between " " ....
the parameter number 7 probably only take the first because exist a space between them , could be that ? what can i change this one to send to all of them ?
thanks, Manuales.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-01-2006 01:13 PM
06-01-2006 01:13 PM
Re: A variable is taken as several parameter given to a function.
Without knowing how the function, fun_cel_mail_message, itself is written it's not possible to know but if the function is addressing your instantiation of ${emails_patitlo} as simply ${7} then then only thing that ${7} is going to contain is "user1@patito.com"
What you can do is store the 1st 6 parameters into variables and then
shift 6
while [[ ${#} -ge 1 ]]
do
mail_something_to ${1}
shift
fi
or if you invoke your function like this:
fun_cel_mail_message 2 $SERVER_name 1001 2001 send ${www} "${emails_patito}"
$7 will now contain the entire list. This is a case of the shell doing exactly what you are telling it to do.
What you can do is store the 1st 6 parameters into variables and then
shift 6
while [[ ${#} -ge 1 ]]
do
mail_something_to ${1}
shift
fi
or if you invoke your function like this:
fun_cel_mail_message 2 $SERVER_name 1001 2001 send ${www} "${emails_patito}"
$7 will now contain the entire list. This is a case of the shell doing exactly what you are telling it to do.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP