Runnin Sequential commands

I hav 2 execute the following commmands in bash shell sequentially

i can execute the following commands ie
#mkdir /export/zone1 /export/zone1
#chmod 700 /export/zone1

#zonnefg -z zone1 this command has to change the propmpt as
#zonecfg:zone1>
only wen the prompt changes to #zonecfg:zone1> i can execute CREATE cmd.

im not able 2 execute this shell script!!!!
can u plzzz help us?

Why don't you try using here-docs? Something like this might work:

zonecfg -z zone1 <<EOF
create
set zonepath=/zone1
...
...
EOF

mkdir /export/zone3
chhm0d 700 /export/zone3
zonecfg -z zone3 <<EOF
create
set zonepath=/export/zone3
set autoboot=true
add net
set physical=bge0
set address=172.1.2.86
end
verify
commit
exit
EOF
zonedam -z zone3 install

i tried using this but it just creating the path and its directory nothin s being performed!!! wat 2 do? after zonecfg:zone3> the prompt has 2 change into zonecfg:zone3:net > after executin add net cmd! but in vain nothin s being performed from the shell script

mkdir /export/zone3
chhm0d 700 /export/zone3
zonecfg -z zone3 <<EOF
create
set zonepath=/export/zone3
set autoboot=true
add net
set physical=bge0
set address=172.1.2.86
end
verify
commit
exit
EOF
zonedam -z zone3 install

i tried using this but it just creating the path and its directory nothin s being performed!!! wat 2 do? after zonecfg:zone3> the prompt has 2 change into zonecfg:zone3:net > after executin add net cmd! but in vain nothin s being performed from the shell script
Edit/Delete Message

First of all, follow the rules. No duplicate posts. Secondly, have you looked at the -f option of zonecfg? It allows putting all commands that you want to run in one file which is read and executed line by line. Read the man page to see how you can use this.

sorry for abiding rules!
sir i tried the -f option but in vain tat s not happenin!
i need to execute these set of cmds wen i click on the create button!
its only creating a blank directory but! its not executing the sub cmds which is inside the zonecfg resource? how 2 do? plz help...... :frowning: