0

Hi,

I wan tto use 2 variables at same time in single loop. Like

for i in vs01a vs01b for k in 1 2
do
rsh $i echo 'tail -20 /opt/oracle/admin/+ASM/bdump/alert_+ASM$k.log' >> VS_logs.txt

how to do it. because for vso1a it's ASM1.log whereas for vs01b it's ASM2.log.

help me!!

2
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by lastkey
0
for i in vs01a vs01b 
do
	for k in 1 2 
	do
		rsh $i echo $(tail -20 /opt/oracle/admin/+ASM/bdump/alert_+ASM"$k".log) >> VS_logs.txt
    done
done

For "rsh" do you mean rexec or remsh? Or does rsh create a remote shell on remote systems using your OS?

0

rsh means remote shell. We use this method to access our remote systems. you applied two loops in the solution. But I've said ASM1.log file is on VS01a but not on VS01b, and ASM2.log is on VS01b not on VS01a. so it will give error when executed.

0

rsh means remote shell. We use this method to access our remote systems. you applied two loops in the solution. But I've said ASM1.log file is on VS01a but not on VS01b, and ASM2.log is on VS01b not on VS01a. so it will give error when executed.

Why loop? you only need two rsh lines. You gain nothing by looping.

0

Why loop? you only need two rsh lines. You gain nothing by looping.

:cheesy: lol. Why!!!! That's what I did wrote straight two lines. But is there any harm to know the alternative way :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.