Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

cut script problem

  Date: Nov 24    Category: Unix / Linux / Ubuntu    Views: 546
  

i am using a network of 15 boxes for routing table build up purposes.
i have a routing file that stores info in a text file and contains the
following information

bw.txt
----

Router-id S_no BW
192.168.30.1 0 64
192.168.30.1 1 64
192.168.10.1 0 64
192.168.20.1 1 64

i would like to transfer, by ftp, this to all the 15 boxes.
one option would be to 'ftp' individually to each linux box.
another option would be to use a script.
so i used cut -f1 bw.txt | uniq to get the router - ids.
it gives o/p like:

Router-id
192.168.30.1
192.168.10.1
192.168.20.1

i dont want the first line("Router-id ") how do cut that out from the o/p ?

then again, to automate ftp file transfer, i use the .netrc file. i have used
it for individual file transfers. it works well.
i'd like to write something like:

for (each router-id)
ftp router-id
end for

any help(whatever would i do witout the mail-list :-))?

Share: 

 

1 Answer Found

 
Answer #1    Answered On: Nov 24    

Explore the head and tail commands. This will give you help.

 
Didn't find what you were looking for? Find more on cut script problem Or get search suggestion and latest updates.




Tagged: