shell scripting gurus?

Les Mikesell lesmikesell at gmail.com
Thu Jun 5 15:41:37 UTC 2008


Bart Silverstrim wrote:
> If I have a file of IP addresses, one per line, is there an easy way to 
> have a shell script read each line and perform an operation that plugs 
> that IP into another command?

while read $IP
  do
   something $IP
  done < file_name

(assuming it doesn't hurt to redirect stdin for the whole loop)

-- 
   Les Mikesell
    lesmikesell at gmail.com




More information about the ubuntu-users mailing list