projects
/
ghc-hetmet.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[project @ 2000-07-07 12:13:22 by simonpj]
[ghc-hetmet.git]
/
ghc
/
interpreter
/
test
/
before
1
#!/usr/bin/perl
2
3
die "Usage: before <regexp>" unless $ARGV[0];
4
5
$pat = $ARGV[0];
6
7
# Filter that trims lines after regexp
8
9
# print the initial part
10
while (<STDIN>) {
11
last if /$pat/;
12
print;
13
}
14
15
exit 0;