Using a bash script and a looping structure, I want to do the following:
for each command in list
{ command 1
command 2
command 3
command 4 }
/usr/bin/rsh 10.1.100.92 -l admin $command >> pre_dump
This would automate the following for example:
/usr/bin/rsh 10.1.100.92 -l admin show cdp neighbor | awk ' { print $1 } ' | grep -v "Gig" | grep -v "Fast" >> pre_dump
/usr/bin/rsh 10.1.100.92 -l admin show mac-addr dyn | awk ' { print $2,$3,$4,$5,$7,$9 } ' | grep -v "*" | grep -v "-" >> pre_dump
/usr/bin/rsh 10.1.100.92 -l admin show span blocked >> pre_dump
....
Can you please help me with the coding ? (shell is bash )
Thanks
PA
Any help appreciated.
thanks
PA