22 lines
233 B
Plaintext
22 lines
233 B
Plaintext
|
#!/bin/rc
|
||
|
fn usage {
|
||
|
echo usage: $0 [-n num] program [arguments]
|
||
|
exit usage
|
||
|
}
|
||
|
rfork e
|
||
|
ifs='
|
||
|
'
|
||
|
nargs=1
|
||
|
while(~ $1 -*) {
|
||
|
switch($1) {
|
||
|
case -n
|
||
|
nargs=$2
|
||
|
shift 2
|
||
|
case *
|
||
|
echo bla
|
||
|
usage
|
||
|
}
|
||
|
}
|
||
|
while(x = `{read -n $nargs})
|
||
|
$* $x
|