Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bar
- second
- third
- fourth
- bar
- sixth
- i=$(grep -nrH ${pattern} ${file} | awk -F':' '{if (NR==2)print $2}')
- if [[ ${i} != "" ]];then head -n $(( ${i} - 1 )) ${file} > tmp && mv tmp ${file};fi
- bar
- second
- third
- fourth
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement