在shell 中不退出控制台执行command

#!/bin/sh
COUNTER=1
while [  $COUNTER -lt 101 ]; do 
        psql xcatdb xcatadm << EOF
insert into nodelist (node,groups,status,statustime,appstatustime,primarysn,hidden,updatestatus,updatestatustime,comments,disable) v
alues ('$COUNTER','22','33','22','33','22','33','22','33','22','33');
EOF
        let COUNTER=COUNTER+1  
done

 

 

-----------------

 

 

#!/bin/sh
COUNTER=5
egosh user logon -u Admin -x Admin
while [  $COUNTER -lt 101 ]; do
        egosh << EOF
        client reg  -c dd -MDS
        alloc new -P rp1 -p /A -M 1 -d ncpus=0.1,maxmem=1-P rp1 -p /A -M 1 -d ncpus=0.1,maxmem=1
EOF
        let COUNTER=COUNTER+1
done 

你可能感兴趣的:(shell)