Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: match

01 Oct

Command to Print Until Regular Expression

Print a file until a regular expression is matched.


cat file.txt | perl -pe "exit if(/Thats all/)"
admin Posted in Command Line, Perl command, expression, match, Perl, regular, string Leave a comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑