Search Results

Search: Posts Made By: MadeInGermany
2,780
Posted By MadeInGermany
egrep -C 1 you can emulate with awk: awk '$0~s...
egrep -C 1 you can emulate with awk:
awk '$0~s {if (bb) {print b; bb=0}; print; if (getline) print; next} {b=$0; bb=1}' s="555" test.txt
(In Solaris, you need nawk or /usr/xpg4/bin/awk)
Showing results 1 to 1 of 1

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