|
| From: | Paul Jarc |
| Subject: | Re: how to save "$@", shift and reset $@ ? |
| Date: | Thu, 29 May 2003 17:11:53 -0400 |
| User-agent: | Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
gk <address@hidden> wrote:
> Thanks for the great ideas.
> This does the trick for me:
>
> #!/usr/local/bin/bash
>
> echo num params=$#
> saved=("$@")
> echo 'set -- $saved'
> set -- $saved
I think that should be:
set -- "address@hidden"
Otherwise, you'll only get the first argument, and it'll be split.
paul
| [Prev in Thread] | Current Thread | [Next in Thread] |