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
|
||||
nl='
|
||||
'
|
||||
|
@ -9,21 +9,21 @@ while(! ~ $#* 1 && ~ $1 -* && ! ~ $1 --){
|
|||
recurse=-n1
|
||||
if not
|
||||
flags=($flags $1);
|
||||
shift
|
||||
}
|
||||
if(~ $1 --)
|
||||
shift
|
||||
shift
|
||||
}
|
||||
if(~ $1 --)
|
||||
shift
|
||||
|
||||
switch($#*){
|
||||
case 0
|
||||
echo 'usage: g [flags] pattern [files]' >[1=2]
|
||||
exit usage
|
||||
case 1
|
||||
switch($#*){
|
||||
case 0
|
||||
echo 'usage: g [flags] pattern [files]' >[1=2]
|
||||
exit usage
|
||||
case 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}
|
||||
case *
|
||||
pattern=$1
|
||||
shift
|
||||
files=($*)
|
||||
}
|
||||
case *
|
||||
pattern=$1
|
||||
shift
|
||||
files=($*)
|
||||
}
|
||||
grep -n $flags -- $pattern $files /dev/null
|
||||
|
|
Loading…
Reference in a new issue