- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- $* alternative to find command line arguments?
Categories
Company
Local Language
Forums
Discussions
- Integrity Servers
- Server Clustering
- HPE NonStop Compute
- HPE Apollo Systems
- High Performance Computing
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Knowledge Base
Forums
Discussions
- Cloud Mentoring and Education
- Software - General
- HPE OneView
- HPE Ezmeral Software platform
- HPE OpsRamp Software
Knowledge Base
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
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