相关疑难解决方法(0)

sh和bash之间的区别

在编写shell程序时,我们经常使用/bin/sh/bin/bash.我经常使用bash,但我不知道它们之间有什么区别.

bash和之间的主要区别是sh什么?

我们究竟需要意识到在编程时bashsh

unix bash shell sh

1194
推荐指数
11
解决办法
46万
查看次数

何时在shell变量周围包装引号?

有人能告诉我是否应该在shell脚本中包含变量的引号?

例如,以下是正确的:

xdg-open $URL 
[ $? -eq 2 ]
Run Code Online (Sandbox Code Playgroud)

要么

xdg-open "$URL"
[ "$?" -eq "2" ]
Run Code Online (Sandbox Code Playgroud)

如果是这样,为什么?

unix linux bash shell quotes

145
推荐指数
4
解决办法
5万
查看次数

标签 统计

bash ×2

shell ×2

unix ×2

linux ×1

quotes ×1

sh ×1