- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- $* alternative to find command line arguments?
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
тАО06-17-2004 08:39 PM
тАО06-17-2004 08:39 PM
Is there an alternative to $* to list/find command line arguments?
I heard someone mention the @ sign the other day!
Thanks
Solved! Go to Solution.
- Tags:
- variable
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-17-2004 08:55 PM
тАО06-17-2004 08:55 PM
Re: $* alternative to find command line arguments?
When used as a command argument, "$*" is equivalent to "$1d$2d...", where d is the first character of the IFS parameter,
whereas "$@" is equivalent to "$1" "$2" .... Inside back single quote
(accent grave) marks (``) \ quotes the characters \, `, and $. If the
back single quotes occur within double quotes, \ also quotes the
character ".
The special meaning of keywords or aliases can be removed by quoting any character of the keyword. The recognition of function names or special command names listed below cannot be altered by quoting them.
From man of ksh.
Hope that helps.
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 08:48 AM
тАО06-23-2004 08:48 AM
Solution#!/bin/ksh
# myfile.sh
for X in "$@"
do
echo " arg $X"
done
for X in "$*"
do
echo " arg $X"
done
Then run it:
sh ./myfile.sh a b c d e f g
You see that $@ takes the letters one at a time and $* takes it all.
steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 11:30 AM
тАО06-23-2004 11:30 AM
Re: $* alternative to find command line arguments?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-23-2004 11:57 PM
тАО06-23-2004 11:57 PM
Re: $* alternative to find command line arguments?
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-27-2004 12:53 PM
тАО06-27-2004 12:53 PM
Re: $* alternative to find command line arguments?
mind you some of us here need to sort ourselves out.
well I'm glad I changed your attitude, we need folk like you...
thanks