new-exp2.sub

来自「android-w.song.android.widget」· SUB 代码 · 共 37 行

SUB
37
字号
export LC_ALL=Cexport LANG=C# test out the new $(< filename) code# it should be exactly equivalent to $(cat filename)FILENAME=/tmp/bashtmp.x$$trap 'rm -f $FILENAME' 0cat >$FILENAME << EOFline 1line 2line 3EOFLINES1=$(cat $FILENAME)LINES2=$(< $FILENAME)if [[ $LINES1 != $LINES2 ]]; then	echo 'whoops: $(< filename) failed'fiLINES2=$(< /tmp/bashtmp.x*)if [[ $LINES1 != $LINES2 ]]; then	echo 'whoops: $(< filename) with glob expansion failed'fi# but the glob expansion in the redirection should fail in posix modeset -o posixLINES2=$(< /tmp/bashtmp.x*)set +o posix# now see what happens when we try it with a non-existant fileLINES3=$(< /tmp/redir-notthere)echo $?

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?