[nycbug-talk] Scripting Question

Kevin Reiter KReiter at insidefsi.net
Thu Mar 8 10:44:19 EST 2007


All,

I know this doesn't pertain to *BSD specifically, but I know there are scripting gurus in here that may know how to do this.

What I'm trying to do is take a file containing a list of numbers, in the form of:

1
2
3
4
5

and convert it to a comma-delimited list on a single line (i.e. 1,2,3,4,5) and write that to an existing file on a specific line.

(For the curious, what I'm trying to accomplish is taking the results of an Nmap scan, grepping the open ports found, and writing those ports to .nessusrc in order to have Nessus only scan the open ports.  I'm using Free 6.2-RELEASE as my platform of choice, and Bash as my shell, FWIW)

The examples I've found on a few Google searches don't come close enough to provide any clues.

TIA,
Kev


Kevin Reiter
Senior Security Engineer
Financial Services, Inc.
21 Harristown Road
Glen Rock, New Jersey 07452
(201)652-6000, ext. 588
PGP ID: 0xEE665233

This message may contain confidential or proprietary information and is intended solely for the individual(s) to whom it is addressed.  If you are not a named addressee you should not disseminate, distribute or copy this e-mail or act upon the information contained herein.  Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system.




More information about the talk mailing list