pass the arugument-- suggest me.
am 21.11.2007 12:54:16 von saranmca
Hi Friends,
four machines (xxx, aaa,bbb,ccc). Store these machine name in one
file and pass that file to your script as an argument. create this
file as follows: (say filename args_machine)
Machine users
xxx 111
aaa 222
bbb 333
ccc 444
2. Create a result directory, say result_dir.
3. log on these machines one by one and create a file in result_dir
area with the name like result_$machine_name. and print $machine name
and value associated with that (in second column) name args_machine in
this file. use "hostname" command to print machine name and use "grep"
and "awk" command to print value associated with that machine
name(obtained from the output of "hostaname" command ) using
args_machine. so finally there will be four result files in result_dir
area. after this logout from that machine and move to next machine in
args_machine list
Re: pass the arugument-- suggest me.
am 21.11.2007 13:43:14 von Janis Papanagnou
On 21 Nov., 12:54, "saravanan.s" wrote:
> Hi Friends,
>
> four machines (xxx, aaa,bbb,ccc). Store these machine name in one
> file and pass that file to your script as an argument. create this
> file as follows: (say filename args_machine)
>
> Machine users
>
> xxx 111
> aaa 222
> bbb 333
> ccc 444
>
> 2. Create a result directory, say result_dir.
> 3. log on these machines one by one and create a file in result_dir
> area with the name like result_$machine_name. and print $machine name
> and value associated with that (in second column) name args_machine in
> this file. use "hostname" command to print machine name and use "grep"
> and "awk" command to print value associated with that machine
> name(obtained from the output of "hostaname" command ) using
> args_machine. so finally there will be four result files in result_dir
> area. after this logout from that machine and move to next machine in
> args_machine list
After reading this homework assignment I am still missing what your
solution so far is, and what concrete questions you have.
Janis
Re: pass the arugument-- suggest me.
am 21.11.2007 17:59:43 von Jan Schampera
Janis wrote:
>> [HOMEWORK ASSIGNMENT]
> After reading this homework assignment I am still missing what your
> solution so far is, and what concrete questions you have.
Didn't you see the "do it for me" between line 1 and line 1.5? ;-)
J.