Remove trailing whitespace.
This commit is contained in:
parent
41be41b493
commit
341b64b5bd
1 changed files with 15 additions and 15 deletions
30
rc/bin/g
30
rc/bin/g
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/rc
|
#!/bin/rc
|
||||||
rfork e
|
rfork e
|
||||||
nl='
|
nl='
|
||||||
'
|
'
|
||||||
|
@ -9,21 +9,21 @@ while(! ~ $#* 1 && ~ $1 -* && ! ~ $1 --){
|
||||||
recurse=-n1
|
recurse=-n1
|
||||||
if not
|
if not
|
||||||
flags=($flags $1);
|
flags=($flags $1);
|
||||||
shift
|
shift
|
||||||
}
|
}
|
||||||
if(~ $1 --)
|
if(~ $1 --)
|
||||||
shift
|
shift
|
||||||
|
|
||||||
switch($#*){
|
switch($#*){
|
||||||
case 0
|
case 0
|
||||||
echo 'usage: g [flags] pattern [files]' >[1=2]
|
echo 'usage: g [flags] pattern [files]' >[1=2]
|
||||||
exit usage
|
exit usage
|
||||||
case 1
|
case 1
|
||||||
pattern=$1
|
pattern=$1
|
||||||
files=`$nl{walk -f $recurse | grep '\.([bcChlmsy]|asm|awk|cc|cgi|cpp|cs|go|goc|java|lx|ms|pl|py|rc|tex|xy)$' >[2]/dev/null}
|
files=`$nl{walk -f $recurse | grep '\.([bcChlmsy]|asm|awk|cc|cgi|cpp|cs|go|goc|java|lx|ms|pl|py|rc|tex|xy)$' >[2]/dev/null}
|
||||||
case *
|
case *
|
||||||
pattern=$1
|
pattern=$1
|
||||||
shift
|
shift
|
||||||
files=($*)
|
files=($*)
|
||||||
}
|
}
|
||||||
grep -n $flags -- $pattern $files /dev/null
|
grep -n $flags -- $pattern $files /dev/null
|
||||||
|
|
Loading…
Reference in a new issue