[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Nmh-workers] Redoing argument processing
From: |
Ralph Corderoy |
Subject: |
Re: [Nmh-workers] Redoing argument processing |
Date: |
Thu, 17 Jan 2013 21:37:43 +0000 |
Hi Ken,
> Only problem with that is that "arg1" gets put into $0, which doesn't
> get expanded by $@, so it should really be:
>
> /bin/sh -c 'proc "$@"' dummyarg arg1 arg2 arg3
>
> What do others think about this? Anything I'm missing?
No, I think that's the way to approach it. There's a history of using
${1+"$@"} instead of plain "$@" but I forget why; perhaps because some
sh used to turn "$@" into "" when there were no arguments, just as "$*"
does. But that's history so I'd go with the simple clean way. dummyarg
could be /bin/sh.
Cheers, Ralph.
Re: [Nmh-workers] Redoing argument processing, Ralph Corderoy, 2013/01/17
Re: [Nmh-workers] Redoing argument processing, Paul Fox, 2013/01/17