Project

General

Profile

« Previous | Next » 

Revision 13270

lib/sh/util.sh: added 1st_non_opt()

View differences:

trunk/lib/sh/util.sh
255 255
# removes keyword-param-only vars from the environment
256 256
{ unexport "$@"; }
257 257

  
258
1st_non_opt() { while starts_with - "$1"; do shift; done; echo "$1"; }
259

  
258 260
# usage: cmd=... foreach_arg
259 261
function foreach_arg()
260 262
{

Also available in: Unified diff