关注

(1)
echo "value is $foo"
echo 'value is $foo'
variables in single quote will not be replaced.

(2)
You can define a function in a .sh file and then source it. Then you can use this function in your terminal.

(3)
$? will get you the error code from the previous command.
$_ will get you the last argument of the previous command.

(4)
in shell, `!!+tab` = your previous command.


登录以加入对话
雾海

雾海是一个开放且不限制讨论主题的非营利性中文社区,名字来源于德国浪漫主义画家 Friedrich 的画作《雾海上的旅人》。生活总是在雾海中吞吐不定,不管怎么艰辛,他还是站在了这里!希望大家在这里玩的开心~