LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   set x args... && shift vs set -- args... (https://www.linuxquestions.org/questions/linux-software-2/set-x-args-and-and-shift-vs-set-args-4175436897/)

leniviy 11-13-2012 03:11 AM

set x args... && shift vs set -- args...
 
Hi. Has anyone seen shells, whose built-in 'set' command doesn't recognize the double-dash '--' as the end of options?

I'm looking for a portable way to fill the "$@" array with arbitrary arguments.
I tried Solaris sh, ksh, bash, zsh and they all understand double dash.

pan64 11-13-2012 04:17 AM

probably you will not find any, but you can write a small code to test it. It looks like a very old and common option.


All times are GMT -5. The time now is 05:37 PM.