TECHIES WORLD

For Techs.... Techniques.... Technologies....

CpanelLinux

How to print the content of a file upto the match

To print the content of a file upto the matched string in bash, use the following command.

#sed '/PATTERN/q' filename

Where 'PATTERN' is the string to be searched.

 

Leave a Reply