我有以下文件
#+BEGIN_SRC shell
ls | head -15
#+END_SRC
#+RESULTS:
| 00.contents.org |
| 00.preface.html |
| C_Programming_Language_split_011.html |
| C_Programming_Language_split_012.html |
| C_Programming_Language_split_013.html |
| C_Programming_Language_split_014.html |
| C_Programming_Language_split_015.html |
| C_Programming_Language_split_016.html |
| C_Programming_Language_split_017.html |
| C_Programming_Language_split_018.html |
| C_Programming_Language_split_019.html |
| C_Programming_Language_split_020.html |
| C_Programming_Language_split_021.html |
| C_Programming_Language_split_022.html |
| C_Programming_Language_split_023.html |
我打算从 011 连接到 019 并尝试过
#+BEGIN_SRC shell :results output
ls C_Programming_Language_split_0[11-19].html
#+END_SRC
它报告错误:
ls: cannot access 'C_Programming_Language_split_0[11-19].html': No such file or directory
怎么可能搞定?
您需要大括号扩展代替
[11-19]
或者
[11-19]
是一个 glob 表达式,它匹配单个字符1
,或范围 from1
到1
, or 中的一个字符9
(所以是1
or9
)。