Hi,
I want to know how i can add variable from grep -n value with another value (enter manualy) : this is my example
cat fileName | grep -i "pattern" -n $(cat fileName | grep -i "pattern" | sed -n 's/^\([0-9]*\)[:].*/\1/p')+ 1
Shell : how to add number from another
Hi,
I want to know how i can add variable from grep -n value with another value (enter manualy) :
this is my example
cat fileName | grep -i "pattern" -n $(cat fileName | grep -i "pattern" | sed -n 's/^\([0-9]*\)[:].*/\1/p')+ 1