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

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.

主站蜘蛛池模板: 宁安市| 绥滨县| 唐海县| 多伦县| 苗栗市| 怀化市| 和平区| 武城县| 湄潭县| 宁河县| 江北区| 仁布县| 顺平县| 崇义县| 元阳县| 前郭尔| 漾濞| 河北区| 天津市| 本溪市| 长春市| 乡宁县| 双城市| 依兰县| 临湘市| 泊头市| 麟游县| 炉霍县| 佛山市| 安庆市| 滦南县| 江川县| 定陶县| 盖州市| 竹北市| 西盟| 郯城县| 开原市| 兴义市| 巧家县| 伊金霍洛旗|