Penetration Testing mailing list archives
Re: Nmap results in spreadsheet format
From: "Eric Paynter" <eric () arcticbears com>
Date: Thu, 17 Jun 2004 17:01:32 -0700 (PDT)
On Thu, June 17, 2004 8:00 am, Bill Z. said:
On Tue, 15 Jun 2004, Eric Paynter wrote:On Mon, June 14, 2004 11:22 am, Bill Z. said:echo "<table>" ; grep "^[0-9*]" nmap-out | awk '{print "<tr><td>" $1 \ "<td>" $2 "<td>" $3}'; echo "</table>" > nmap-out.xlswith my shell, the redirect to nmap-out.xls only applied to the last command. The following fixes [...] echo "<table>" > nmap-out.xls grep "^[0-9*]" nmap-out | awk '{print "<tr><td>" $1 \ "</td><td>" $2 "</td><td>" $3 "</td></tr>"}' nmap-out.xls echo "</table>" >> nmap-out.xlsI only used ONE command (note the blackslash), so it doesn't make sense that the redirect "only applied to the LAST command".
By commands, I meant the parts separated by semicolons. I ran it using bash and it only redirected the part after the last semicolon. i.e. I got "</table>" in my file while the rest went to stdout. I could have done it with semicolons to make it one "command" (using your meaning for the word) - I didn't simply for layout. If you prefer: echo "<table>" > nmap-out.xls ; \ grep "^[0-9*]" nmap-out | awk '{print "<tr><td>" $1 \ "</td><td>" $2 "</td><td>" $3 "</td></tr>"}' nmap-out.xls ; \ echo "</table>" >> nmap-out.xls Now it's one "command" that still sends all output to the same file using my version of bash... :-) -Eric -- arctic bears - affordable email and name services @yourdomain.com http://www.arcticbears.com
Current thread:
- Nmap results in spreadsheet format, (continued)
- Nmap results in spreadsheet format Jerry Shenk (Jun 14)
- Re: Nmap results in spreadsheet format James Davis (Jun 14)
- RE: Nmap results in spreadsheet format Chuck Fullerton (Jun 14)
- RE: Nmap results in spreadsheet format R. DuFresne (Jun 15)
- Re: Nmap results in spreadsheet format Denis Solaro (Jun 14)
- Re: Nmap results in spreadsheet format Serg B. (Jun 14)
- Re: Nmap results in spreadsheet format Bill Z. (Jun 15)
- RE: Nmap results in spreadsheet format Hasnain Atique (Jun 15)
- Re: Nmap results in spreadsheet format Eric Paynter (Jun 16)
- Re: Nmap results in spreadsheet format Bill Z. (Jun 17)
- Re: Nmap results in spreadsheet format Eric Paynter (Jun 17)
- Re: Nmap results in spreadsheet format Bill Z. (Jun 19)
- Nmap results in spreadsheet format Jerry Shenk (Jun 14)
- Re: Hacking Demo and Test Lab s b (Jun 15)
- Re: Hacking Demo and Test Lab Mr Harry! (Jun 14)
- RE: Hacking Demo and Test Lab Ben Nagy (Jun 14)