sanjaysahu Posted December 9, 2011 Report Share Posted December 9, 2011 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 More sharing options...
Nadimitla Abbulu Posted December 9, 2011 Report Share Posted December 9, 2011 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 More sharing options...
dennis Posted December 9, 2011 Report Share Posted December 9, 2011 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 More sharing options...
k2s Posted December 9, 2011 Report Share Posted December 9, 2011 Link to comment Share on other sites More sharing options...
dennis Posted December 9, 2011 Report Share Posted December 9, 2011 [quote name='k2s' timestamp='1323449339' post='1301119836'] [/quote] uncle fellaw, help that guy Link to comment Share on other sites More sharing options...
Recommended Posts