[Gllug] [SPAM -4] Re: Help with Script.

Henrik Bilar henrik at bilar.co.uk
Mon Jan 10 17:31:16 UTC 2011




On 10 Jan 2011, at 15:39, Jason Clifford <jason at ukfsn.org> wrote:
> 
>> nmap 10.72.92.0/22 -sP | grep MAC | cut -d " " -f3 > live.txt
> 
> The "cut" part needs to be :
> 
> cut -d " " -f3 - >> live.txt
> 
> as the file is STDIN and out want to append to live.txt rather than
> overwriting it completely with each match.

Using > is fine for the nmap as it's one command, not a series of them.
> 

Personally, i dont like spooling to disk if i can avoid it, so i'd incorporate the nmap into the loop.



-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list