xshell exports scripts and files (when the sh command is running, it will report an error in the last line./The interpreter will report an error when it is executed)
There are many times when shell scripts written in Linux are written and copied directly after they are written, they will report an error when they are used. When the sh command is run, it will report an error in the last line. /When executed, it will report an error in the interpreter or something. The main reason for this problem is that the script is copied to Windows instead of exported to a Windows computer. There are certain differences between Windows and Linux. Here is the solution.
first step
先查看lrzsz 有的话直接执行第三步 没有的话执行第二步
Second step
使用yum进行安装
third step
- 直接选择你想导出的脚本或文件 使用sz命令跟名字 然后就会弹出弹窗 选择你想保存的位置
When the exported script is imported and used next time, it can be directly authorized to execute permissions and the above errors will not be reported.