$'\r': command not found 或者 syntax error: unexpected end of file 或者 syntax error near unexpected token `$'\r''
执行shell脚本如果报如下错误:
syntax error near unexpected token `$'\r''
syntax error: unexpected end of file
$'\r': command not found
可能原因是写代码是编辑环境是window,或者Linux下的非Linux编码,
可以执行:dos2unix filename 来解决。
随机推荐
- DefaultTableCellRenderer 自定义
方式一: DefaultTableCellRenderer render = new DefaultTableCellRenderer(); render.setHorizontalAlignment ...
- [bzoj2154]Crash的数字表格(mobius反演)
题意:$\sum\limits_{i = 1}^n {\sum\limits_{j = 1}^m {lcm(i,j)} } $ 解题关键: $\sum\limits_{i = 1}^n {\sum\l ...
- PCL中有哪些可用的PointT类型(5)
博客转载自:http://www.pclcn.org/study/shownews.php?lang=cn&id=270 Narf36 - float x, y, z, roll, pitch ...
- linux 下 .o 文件, .a文件,.so文件的区别
最近在unbuntu环境下开发代码,由于很少使用linux开发环境,所以对linux编译方面了解更少,关于.o, .a, .so文件和可执行文件一直很困惑 今天特意查了一下关于它们的区分: .o 就相 ...
- .net 扩展方法,lamada表达式 委托
扩展方法 (1)扩展方法是一种特殊的静态方法,它定义在一个静态类中,但可以在其他类的对象上向调用实例方法那样进行调用.因此,通过扩展方法,我们就可以在不修改一个类型的前提下对一个类型进行功能上的扩充, ...
- Animation Blueprint, Set Custom Variables Via C++
https://wiki.unrealengine.com/Animation_Blueprint,_Set_Custom_Variables_Via_C%2B%2B Animation Bluepr ...
- AcDbSymbolTable of AcDbDatabase
AcDbBlockTable AcDbLayerTable AcDbTextStyleTable AcDbLinetypeTable AcDbViewTable AcDbUCSTable AcDbVi ...
- 阿里云服务器新手安装nginx
1.域名购买之后 备案. 2.购买服务器. 3.这两个条件具备之后进行下一步. 本人使用Mac ,实践流程按照Mac本的流程操作. 作为初学者,简配的服务器, 实例类型: I/O优化,操作系统: Ce ...
- 基于react+如何搭建一个完整的前端框架(1)
1.使用 create-react-app 快速构建 React 开发环境 create-react-app 是来自于 Facebook,通过该命令我们无需配置就能快速构建 React 开发环境. ...
- js组件化(转载)
今天想着开始封装自己的UI库和组件库,从网上看到一篇很好的关于js组件化的文章,现在分享一下. 转载地址:https://blog.csdn.net/Prince_fmx/article/detail ...