Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
scripting:posparams [2015/08/06 04:29]
bill_thomson
scripting:posparams [2015/10/20 02:49] (current)
anthony additional info for using set
Line 259: Line 259:
  
 It's wise to signal "end of options"​ when setting positional It's wise to signal "end of options"​ when setting positional
-parameters this way. If not, the dashes might be interpreted as an option ​swich+parameters this way. If not, the dashes might be interpreted as an option ​switch
 by ''​set''​ itself: by ''​set''​ itself:
  
Line 266: Line 266:
 set -- ... set -- ...
 set - ... set - ...
 +</​code>​
 +
 +Alternately this will also preserve any verbose (-v) or tracing (-x) flags, which may otherwise be reset by ''​set''​
 +<​code>​
 +set -$- ...
 </​code>​ </​code>​