nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Redoing argument processing

2013-01-17 15:38:04
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.

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>