数据结构如下,我想将“lane-7”更改为“lane-5”。我正在考虑这样的命令,但它不起作用。
find PATH -name "lane-7*" | xargs -i echo mv {} `echo {}|sed 's/lane-7/lane-5/'` | sh
任何想法?谢谢
PATH/28/lane-7-22.fq
PATH/28/lane-7-21.fq
PATH/28/lane-7-18.fq
PATH/28/lane-7-24.fq
PATH/28/lane-7-23.fq
PATH/28/lane-7-19.fq
PATH/28/27/lane-7-22.fq
PATH/28/27/lane-7-21.fq
PATH/28/27/lane-7-18.fq
PATH/28/27/lane-7-24.fq
PATH/28/27/lane-7-23.fq
PATH/28/27/lane-7-19.fq
PATH/28/27/26/lane-7-22.fq
PATH/28/27/26/lane-7-21.fq
PATH/28/27/26/lane-7-18.fq
PATH/28/27/26/lane-7-24.fq
PATH/28/27/26/lane-7-23.fq
PATH/28/27/26/lane-7-19.fq
PATH/28/27/26/25/lane-7-22.fq
PATH/28/27/26/25/lane-7-21.fq
PATH/28/27/26/25/lane-7-18.fq
PATH/28/27/26/25/lane-7-24.fq
PATH/28/27/26/25/lane-7-23.fq
PATH/28/27/26/25/lane-7-19.fq
...