首页 > 技术文章 > linux中花括弧大括号用法

keystone 2020-10-17 17:08 原文

{1,3,5}   ==  1 3 5

{1..5}   ==  1  2  3  4  5

{a..e}  ==  a b c d e

{A..z}

{1..50..2}

{1..50..3}

{1..50..4}

{1..50..5}

 

组合用法

file{1..5}  ==  file1  file2  file3  file4  file5

file{1..2}.{txt,log} == file1.txt  file1.log  file2.txt  file2.log

推荐阅读