unable to run script
hi
i have centos 5.3 i want to run one backup script when i run script show error - bash: /backsvn.sh: /bin/bash^M: bad interpreter: No such file or directory #!/bin/bash clear DATE=`date +%d%m%Y` #D2= `(date -d "2 days ago") +%d-%m-%Y` printf "\nToday's Date - "$DATE"\n\n" printf "\nClearing contents of Backup ...\n" cd /Backup ls sleep 5 rm -Rf *.* ls cd / sleep 5 printf "\nStarting Backup ...\n" . . . . . . # End of script Amar |
Refer the following,
http://www.linuxquestions.org/questi...ectory-461400/ Before questioning just google it, you may get tones of information |
Code:
dos2unix scripname |
Or Try notepad++(windows) to convert line termination and character encoding
|
Thanks
|
All times are GMT -5. The time now is 09:25 PM. |