Printing lines starting from specific text.
How can I print all lines from a file after a specific bit of text? I've tried googling but I came up with nothing.
Essentially I have music information files that list personnel after "psn;" and want to print everything following that. I've tried Code:
cat /path/file.txt | grep psn; Thanks in advance. |
If you want that line should be started where psn comes last, try this.
Code:
grep "psn" /path/of/file.txt | sed 's/.* psn/psn/g' I am considering that there is space before psn |
Try this:
awk '/psn;/{a++}a' <input file> |
Quote:
|
glad to help you. if you really want to say thanks just press yes.
|
Have done.
|
All times are GMT -5. The time now is 07:54 PM. |