Anne Moore wrote: > All > > I'm trying to write a script that will shutdown all zones from the local > zone. I'm not terribly good with scripting (yet), but thought many of > you would be. > > I need to run the command "zoneadm list" and then output each line to a > different variable to run this command: > > zlogin $zonename1 shutdown -y -g0 -i0 > > Does anyone know how one would do something like this? > > Thank you for all of your help!
something like for z in `zoneadm list` do zlogin $z shutdown -y -g0 -i0 done though a bit better might be for z in `zoneadm list` do if [ $z != global ] then zlogin $z shutdown -y -g0 -i0 fi done _______________________________________________ zones-discuss mailing list zones-discuss@opensolaris.org