Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
1 つの文字に対して次の行を結合するにはどうすればよいですか。
> ls file[1-5] > ls file[!3]
以下と同じ結果を生成するには:
> ls file[1-2,4-5] > file1 file2 file4 file5
範囲を使用した正しい構文は次のとおりです。
ls file{[1-2],[4-5]}
確かに文脈によって変わってきます。ではzsh、次のことができます。
zsh
$ set -o EXTENDED_GLOB $ ls file([1-5]~3)