Command to Print Until Regular Expression
Tagged with: command, expression, match, Perl, regular, string
Monday, October 1st, 2007 11:43 PM
Print a file until a regular expression is matched.
cat file.txt | perl -pe "exit if(/Thats all/)"
Print a file until a regular expression is matched.
cat file.txt | perl -pe "exit if(/Thats all/)"