官术网_书友最值得收藏!

Brace expansion

Curly braces allow you to specify a set of characters from which the shell automatically forms all possible combinations. To make this work, the characters to be combined with the given string must be specified as a comma-separated list with no spaces:

    $ touch file{1,2,3}
    $ ls

    $ mkdir directory{1,2,3}{a,b,c}
    $ ls

    $ touch file{a..z}
    $ ls

The following is the summary of various I/O-redirection and logical operators:

For example:

    $ ls || echo "Command un-successful"
    $ ls a abcd || echo "Command un-successful"

These commands will print Command un-successful if the ls command is unsuccessful.

主站蜘蛛池模板: 安宁市| 易门县| 温州市| 涪陵区| 巴南区| 措勤县| 邓州市| 吉林省| 宜兰县| 北流市| 永清县| 大兴区| 郑州市| 磐安县| 丰都县| 建德市| 中卫市| 长白| 合川市| 庆城县| 石家庄市| 西丰县| 泽库县| 新民市| 镇江市| 罗山县| 南木林县| 都江堰市| 霸州市| 黄冈市| 盘山县| 保定市| 勃利县| 本溪市| 武清区| 和政县| 金华市| 连城县| 汶上县| 驻马店市| 凤凰县|