ç°ãªããã£ã¬ã¯ããªã«å ¥ã£ãååã®ãã¡ã¤ã«ã1ç®æã«ã¾ã¨ããã
- ç°ãªããã£ã¬ã¯ããªã«å ¥ã£ãååã®ãã¡ã¤ã«ã1ç®æã«ã¾ã¨ãããã
- ãã¡ã¤ã«åãåä¸ãªã®ã§ãä½ãã¦ãã¼ã¯ãªååã«å¤ããå¿ è¦ãããã
çµè«
for i in `find . | grep .gz` do before=$i after=`echo $before | sed 's/\.\///g' | sed 's/\//_/g'` `cp $before $after` done
ãããªæãã
説æ
ãããªæãã ã¨ããã
find . $ find . -type file ./dirctory_01/a.gz ./dirctory_02/a.gz ./dirctory_03/a.gz
ä¸è¨ã®ãã¡ã¤ã«ããããªãã
./dirctory_01_a.gz ./dirctory_02_a.gz ./dirctory_03_a.gz