1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-29 19:45:31 +02:00
ben-wpan/usrp/doall
Werner Almesberger e52b92f00f usrp/doall: usage and allow passing of arguments to evscan as well
Examples:

doall 'run/*'				# no arguments
doall -o foo.png 'run/*'		# arguments for plscan
doall -a 1 -- -o foo.png 'run/*'	# arguments for evscan and plscan

- usrp/doall: added usage()
- usrp/doall: arguments before -- are passed to evscan
2010-12-01 11:08:41 -03:00

27 lines
373 B
Bash
Executable File

#!/bin/bash -x
usage()
{
echo "usage: $0 [evscan-opt ... --] [plscan-opt ...] 'file-glob'" 1>&2
exit 1
}
[ "$1" ] || usage
evscan_opts=
opts=
while [ "$2" ]; do
if [ "$1" = -- ]; then
evscan_opts=$opts
opts=
else
opts="$opts $1"
fi
shift
done
a=
for n in $1; do
a="$a `basename $n`=<(./evscan $evscan_opts $n)"
done
eval ./plscan $opts $a