Today, I write a shell script, then an error in the implementation of, the following screenshot:
The main reason is the shell file in my windows edit and then upload it to linux system execution. Shell for dos format file format. The linux unix format can only be performed in the format of the script.
We can see the format format files through the vi editor. Proceed as follows:
1. First, open the file with the command vim
2. Use the vi command mode: set ff command
You can see the change file format dos:
3. Modify the file format is unix, use vi modify the file format, the command: set ff = unix
After their execution by viewing the file format set ff command, as follows: