This is due to unix conversion.we can see this type of ^M symbols when script file is copied from one host to other.
Run the below command
#dos2unix afile.sh afile.sh
after running the above command you will get file without ^M at the end.
Note: try to run this command using root user
Note : if you are getting ^M during execution time of script check provided environment details provided in script file are correct or not.
Run the below command
#dos2unix afile.sh afile.sh
after running the above command you will get file without ^M at the end.
Note: try to run this command using root user
Note : if you are getting ^M during execution time of script check provided environment details provided in script file are correct or not.
No comments:
Post a Comment