Search Results

Search: Posts Made By: prodigious8
2,074
Posted By RudiC
How about LN=$(awk '/string/ {print NR - 4}'...
How about LN=$(awk '/string/ {print NR - 4}' $FILENAME)?
2,074
Posted By vgersh99
linenumber=$(( $(grep -n "string" $FILENAME | cut...
linenumber=$(( $(grep -n "string" $FILENAME | cut -d : -f1) - 4 ))
2,074
Posted By cjcox
linenumber=$(expr $(grep -n "string" $FILENAME |...
linenumber=$(expr $(grep -n "string" $FILENAME | cut -d : -f1) - 4)
2,669
Posted By Don Cragun
Note that MadeInGermany's suggestion only works...
Note that MadeInGermany's suggestion only works if there are only two fields on lines that start with SITES. It will replace the 2nd and any following fields the way it is currently written.

I...
Showing results 1 to 4 of 4

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