ter*_*ora 0 shell bash parameter command-substitution
locale管道来获取月份名称,用逗号tr分隔它们,然后用大括号括起来并传递给mkdir. 但整体被视为一根弦。有办法避免这种情况吗?16:07: temp \xe2\xa7\xb2 mkdir {$(locale mon | tr \\; ,)}\n\n16:18: temp \xe2\xa7\xb2 ls -lh\ntotal 4.0K\ndrwxr-xr-x. 2 john john 4.0K Dec 11 16:18 {January,February,March,April,May,June,July,August,September,October,November,December}\n\n16:18: temp \xe2\xa7\xb2 \nRun Code Online (Sandbox Code Playgroud)\n
使用 ”;” 作为输入字段分隔符来分割输出locale man:
IFS=';'
mkdir -- $(locale mon)
Run Code Online (Sandbox Code Playgroud)