Search Results

Search: Posts Made By: TobyNorris
8,351
Posted By TobyNorris
Thanks for the reply. But your solution does not...
Thanks for the reply. But your solution does not do what I need. My problem is more general. In my problem the var1 and var2 are not literal strings but are themselves arbitrary and need to have the...
8,351
Posted By TobyNorris
sed non-greedy pattern matching with wildcard
Toby> cat sample1

This is some arbitrary text before var1, This IS SOME DIFFERENT ARBITRARY TEXT before var2

Toby> sed -e 's/^This .* before //' -e 's/This .* before //' sample1

var2
...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy