Project

General

Profile

« Previous | Next » 

Revision 10400

lib/sh/util.sh: added is_array()

View differences:

lib/sh/util.sh
281 281
	return 1
282 282
}
283 283

  
284
is_array()
285
{
286
	local decl; decl="$(declare -p "$1")" || return; echo_vars decl
287
	starts_with 'declare -a' "$decl" # also matches -ax
288
}
289

  
284 290
#### streams
285 291

  
286 292
pipe_delay() # usage: cmd1 | { pipe_delay; cmd2; }

Also available in: Unified diff