📄 ifs-empty.sh
字号:
#!/bin/bash# If $IFS set, but empty,#+ then "$*" and "$@" do not echo positional params as expected.mecho () # Echo positional parameters.{echo "$1,$2,$3";}IFS="" # Set, but empty.set a b c # Positional parameters.mecho "$*" # abc,,mecho $* # a,b,cmecho $@ # a,b,cmecho "$@" # a,b,c# The behavior of $* and $@ when $IFS is empty depends#+ on whatever Bash or sh version being run.# It is therefore inadvisable to depend on this "feature" in a script.# Thanks, Stephane Chazelas.exit 0
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -