Command substitution with string substitution

后端 未结 3 1889
挽巷
挽巷 2020-12-11 02:10

Is it possible to do something along the lines of:

echo ${$(ls)/foo/bar}

I\'m pretty sure i saw somewhere working example of something like

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-11 03:01

    Why not just

    root@localhost:~# echo `pwd`_whatever_suffix
    /root_whatever_suffix
    

提交回复
热议问题