Posts

Showing posts from December, 2022

\r issue in shell script

 When we create a shell script in windows machine. It add \r\n as end of line, when we move this script to unix machine then we get issue for \r character. In order to resolve this issue, please follow any of of below options.  1. replace \r character in shell script with blank using sed command in unix.  2. for small file recreate the file in unix.  3. if you have notepad++ then go to Edit -> EOL conversion -> Unix this will change the end of line character.  Thank you!!!