[CentOS] grep/sed help
nate
centos at linuxpowered.netWed Jun 10 19:01:14 UTC 2009
- Previous message: [CentOS] grep/sed help
- Next message: [CentOS] grep/sed help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Joseph L. Casale wrote: > if the text indented beneath it has "D:", then do the same and extract > "SNAPSHOT ID" if and only if "E:" follows? If the line counts are constant you could do the reverse: grep -B 3 "\(E:\|D:\)" input.txt | grep Shadow Which would show the 3 lines above a line that has E:\ or D:\ and then only display the lines with the word Shadow. nate
- Previous message: [CentOS] grep/sed help
- Next message: [CentOS] grep/sed help
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list