Sed

Search and replace

sed -e 's/tomcat\/servers\/tomcat-5.5.9_//g' -e 's/\/logs\/tomcat.pid//g' pidfiles.tmp

Output line 2 to 4 only

sed -n 2,4p somefile.txt
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License