Extractions based on Variable
Posted: Tue Jul 25, 2006 11:28 pm
I need help with the following line extractions:
Example of text -
1|1001|dog|1238094710219381098
2|1001|2398479872934872938
3|1001|0892039420938029384
1|1002|cat|23409230498203948
2|1002|23094203480293840924
where "dog", extract (or remove) that line and all following lines that match the variable preceeding dog (1001)
Clarifications:
"dog" is constant, but "1001" is variable... "|" is a delimiter
Thanks
Example of text -
1|1001|dog|1238094710219381098
2|1001|2398479872934872938
3|1001|0892039420938029384
1|1002|cat|23409230498203948
2|1002|23094203480293840924
where "dog", extract (or remove) that line and all following lines that match the variable preceeding dog (1001)
Clarifications:
"dog" is constant, but "1001" is variable... "|" is a delimiter
Thanks