Re: Can $1 be set in a script?
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Thu, 30 Mar 2006 15:46:02 -0500
On 2006-03-30, larryalk wrote:
Can $1 be set to something else in a script?
[I don't think this is the right groups for this question]
For exampe:
$1=teststring
set -- teststring "$@" ## "$@" adds existing positional parameters
or
$1=$($2)
Is that what you want? to put the output from a command in $2 into
$1?
set -- "$($2)"
I have scripts with $1 in them that I don't want to change.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
.
- Follow-Ups:
- Re: Can $1 be set in a script?
- From: larryalk
- Re: Can $1 be set in a script?
- From: larryalk
- Re: Can $1 be set in a script?
- References:
- Can $1 be set in a script?
- From: larryalk
- Can $1 be set in a script?
- Prev by Date: Can $1 be set in a script?
- Next by Date: Re: Can $1 be set in a script?
- Previous by thread: Can $1 be set in a script?
- Next by thread: Re: Can $1 be set in a script?
- Index(es):