原文:编写shell时,遇到let: not found错误及解决办法

bin bash i sum while i le do let sum sum i let i done 在写一个简单的循环脚本时,报错 let: not found,在ubuntu默认是指向bin dash解释器的,dash是阉割版的bash,其功能远没有bash强大和丰富.并且dash不支持let和i 等功能. 解决办法: sudodpkg reconfiguredash 选择 否 , 表 ...

2018-11-26 18:26 0 1145 推荐指数:

查看详情

ubuntu shell 提示 source : not found 原因及解决办法

现象: shell脚本中source aaa.sh提示 source: not found 原因: ls -l `which sh` 提示/bin/sh -> dash 这说明是用dash来进行解析的。 改回方法: 命令行执行:sudo dpkg-reconfigure ...

Fri Apr 30 01:14:00 CST 2021 0 212
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM