Using the result of a command as an argument in bash?

前端 未结 7 1848
野趣味
野趣味 2020-12-04 13:52

To create a playlist for all of the music in a folder, I am using the following command in bash:

ls > list.txt

I would like to use the r

7条回答
  •  温柔的废话
    2020-12-04 14:34

    The syntax is:

    ls > `pwd`.txt
    

    That is the '`' character up underneath the '~', not the regular single quote.

提交回复
热议问题