Executes the. SH script in Linux, exception/bin/sh^m:bad interpreter:no such file or directory.
Analysis: This is the result of different system encoding formats: the. sh file edited in the Windows system may have invisible characters, so it will report the above exception information in the Linux system.
Resolve: 1 convert under Windows:
Use tools such as UltraEdit or editplus to convert scripts to code and then execute them in Linux. The conversion method is as follows (UltraEdit): File-->conversions-->dos->unix.
2) can also be converted in Linux:
First, make sure the file has executable permissions
#sh >chmod a+x filename
Then modify the file format
#sh >vi filename
Use the following command to view file formats
: Set FF or: Set FileFormat
You can see the following information
Fileformat=dos or Fileformat=unix
Use the following command to modify the file format
: Set Ff=unix or: Set Fileformat=unix
: Wq (Disk exit)
Final File Execution
#sh >./filename
#!/bin/bash
#
echo "billing program begin to run ..."
Java Com.xxx.billing.plugins.storm.BillingTopo