input files into bash script??
- From: Ray <raypcook@xxxxxxxxxxxx>
- Date: Sat, 23 Feb 2008 05:59:14 -0800 (PST)
Hi folks I wonder if you could help me out here.
What I'm trying to do is to write a bash script that will read two
input list files and issues commands using lines from both of them.
However I only want the second file to get to the next line once the
first file has got to the bottom and the start again.
For example..
File A is ( for example)
12345
23456
34567
45678
56789
File B is ( for example)
Server1
Server2
Server3
Server4
So the lines in file A would be run on server 1 first. Then all lines
in A on server 2 etc.
I know that it may be possible to do with Input file A and then define
servers 1,2,3,4 as symbols or something but that means I would need to
repeat the command 4 times in the script. I would rather not have to
do that as in the real world there are a lot more then just 4 servers.
I reckon once I know how to deal with the two files I can work the
rest out myself.
Any ideas? I have looked around the web but can only see people
talking about just one input file and not or more.
.
- Follow-Ups:
- Re: input files into bash script??
- From: Janis Papanagnou
- Re: input files into bash script??
- Prev by Date: Re: using ssh remotely
- Next by Date: Re: input files into bash script??
- Previous by thread: ls sort by directories and files?
- Next by thread: Re: input files into bash script??
- Index(es):
Relevant Pages
|