Linux,执行.sh文件,提示No such file or directory
来源:互联网 发布:淘宝排名软件 编辑:程序博客网 时间:2024/05/20 00:16
在window平台下,写好shell脚本文件,迁移到linux平台,赋过可执行权限,执行该sh文件,却提示No such file or directory。ls 了下,确实有该文件,怎么会事呢,
回车,显示fileformat=dos,重新设置下文件格式:
保存退出:
再执行,竟然可以了。这个事情又给我提了次醒,程序尽量在linux下编写,迁移时,也许会少很多问题。
难道是文件格式兼容性问题?用vim打开该sh文件,输入:
- :set ff
回车,显示fileformat=dos,重新设置下文件格式:
- :set ff=unix
保存退出:
- :wq
再执行,竟然可以了。这个事情又给我提了次醒,程序尽量在linux下编写,迁移时,也许会少很多问题。
0 0
- Linux,执行.sh文件,提示No such file or directory
- Linux,执行.sh文件,提示No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题
- 三种关于Linux执行.sh文件,提示No such file or directory错误的解决办法
- Linux下执行.sh文件提示No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题
- Linux下执行.sh文件提示No such file or directory
- Linux下执行.sh文件提示No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux下执行.sh文件提示No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题
- Linux执行.sh文件时提示No such file or directory
- Linux执行.sh文件,提示No such file or directory的问题的解决方法
- Linux执行.sh文件,提示No such file or directory错误
- linux下执行Sh文件报告bin/sh^M: bad interpreter: No such file or directory
- linux下执行Sh文件报告bin/sh^M: bad interpreter: No such file or directory
- 嵌入式Linux 执行程序时提示:-sh: No such file or directory
- 获取用户位置ios8.0以上适配
- git开源库——视图控件——viewpager
- VPN虚拟化
- 隐马尔可夫模型(HMM) - 1 - 基本概念
- 代理模式 Proxy Design Pattern
- Linux,执行.sh文件,提示No such file or directory
- Bootstrap table 服务器端分页示例
- SQL编程:模糊表关联不求人 ---> concat + like就能行
- 一文搞懂算法的时间复杂度与空间复杂度
- C++中math.h库函数
- 笔记整理之BCP
- BCP笔记整理(二)
- Golang测试技术
- “独角兽”初长成,喱喱学车引领互联网学车新模式