Date: Mon, 31 May 1999 23:44:46 -0400 From: Greg Pavelcak <gpavelcak@philos.umass.edu> To: freebsd-questions@freebsd.org Subject: Stupid bash Script Question Message-ID: <19990531234446.A64999@oitunix.oit.umass.edu>
next in thread | raw e-mail | index | archive | help
Starting with a file containing a list of names: firstname1 lastname1 firstname2 lastname2 . . . I wanted to do "whois" on all of them. My idea was: for i in `cat file`; do whois $i >> newfile ; done But the output of that appears to be what would be generated by: whois firstname1 whois lastname1 whois firstname2 etc I tried different uses of quotation marks and piping it through awk, but I couldn't get $i to be "firstname lastname" instead of taking on each name individually. I ended up "brute forcing" it by adding the appropriate "whois" and redirection to each line of the file and then running it, but that offends my aesthetic sensibilities. How do I do this right? Thanks. Greg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990531234446.A64999>