Jump to content

Unix Script Help -very Urgent


sanjaysahu

Recommended Posts

Hi All , mams naku unix scripting radhu .... nenu Nteback up admin, ni .. Naku oka task icharu ... Oka server lo unna clients data kavali ... daniki ok script rayi annadu... maa boss gadu ,, naa colleaguee script ichadu .. kani naaku unix lo basic scripting ela rayalo no idea...
vadu ichina script idhi




for i in `cat /tmp/raj`

do

bpimagelist -l -U -d 12/01/11 -e 12/08/11 -client $i -st Full >> /tmp/raj1

done

check /tmp/raj to make sure the clients r there before starting the for i loop

/tmp/raj1 will have the results

EE loop ni script lo ela rayali ...step by step cheppandi plz .........

Link to comment
Share on other sites

naku kuda teliyadu baa
kani idea ivvagalta

neeku vi editor vacha?

vi script.sh(idi script.sh ani file create chesi editor open chestadi)
akkada nee loop paste cheyyi
aa file ni save chesi close cheyyi

chmod 777 script.sh ( idi aa file ki read write and execute permissions istadi andariki)
tarvata prompt lo ./script.sh ani type cheyyi.. aa file lo unnadi execute avtadi

naku assale teliyadu.. evaru cheppatledu kada ani edo naku telisindi cheppanu
oka sari try cheyyi

Link to comment
Share on other sites

cheema baa cheppindhi follow avvu baa..
1. first /tmp folder raj ane file lo list of clients unnayo levo choodu..leka pothe add chey akkada
2. create new file, say script.sh....to do this use vi script.sh
3.it will open the file, then paste this content in that file

for i in `cat /tmp/raj`

do

bpimagelist -l -U -d 12/01/11 -e 12/08/11 -client $i -st Full >> /tmp/raj1

done

4. save file using Esc :wq
5.change the permission on the script using chmod command ,chmod 777 script.sh
5. then run the script by ./script.sh
6.the output will be saved into the folder/tmp/ into the file raj1

akkadiki velli choodu ...

Link to comment
Share on other sites

×
×
  • Create New...