Tricky brace expansion in shell

前端 未结 4 1048
野趣味
野趣味 2021-01-02 11:34

When using a POSIX shell, the following

touch {quick,man,strong}ly

expands to

touch quickly manly strongly
<
4条回答
  •  Happy的楠姐
    2021-01-02 11:59

    Taking inspiration from the answers above:

    $ TEST=quick,man,strong
    $ touch $(eval echo {$TEST}ly)
    

提交回复
热议问题