Date:2010-12-01 14:56:14 (8 years 7 months ago)
Author:Werner Almesberger
Commit:e52b92f00f85f85166910316da173c137ee175d2
Message: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
Files: usrp/doall (1 diff)

Change Details

usrp/doall
11#!/bin/bash -x
2
3usage()
4{
5    echo "usage: $0 [evscan-opt ... --] [plscan-opt ...] 'file-glob'" 1>&2
6    exit 1
7}
8
9
10[ "$1" ] || usage
11evscan_opts=
212opts=
313while [ "$2" ]; do
4    opts="$opts $1"
14    if [ "$1" = -- ]; then
15    evscan_opts=$opts
16    opts=
17    else
18    opts="$opts $1"
19    fi
520    shift
621done
722a=
823for n in $1; do
9    a="$a `basename $n`=<(./evscan $n)"
24    a="$a `basename $n`=<(./evscan $evscan_opts $n)"
1025done
1126eval ./plscan $opts $a

Archive Download the corresponding diff file



interactive