oh, like this:
sed 's/Interesting ports on/ /'; '/Port/,/https/d'; '1,3d'; 172.25.24.16_111_8th_VPN_netlist_nmap_scan.txt > 24.16_temp.txt
I tried the above and it just hangs, like it's expecting me to type more text. Am I doing something wrong or does it depend on what you're running? I'm running gentoo with 2.6 kernel.
I managed to string multiple commands using the -e command. I typed in another command like this (after executing the above sed command with the -e option):
sed -e '1d' 24.16_temp.txt > 24.16_temp.txt
Unfortunately, it erases the entire contents of 24.16_temp.txt. I'm reading in from the file I just changed and want to rewrite back to it. Is the above the correct procedure for doing so? Am I supposed to use pipe instead of the greater-than symbol, like this:
sed -e '1d' 24.16_temp.txt | 24.16_temp.txt ???
Thanks you very much.
Last edited by Mangenius; 01-22-2007 at 04:42 PM.