linux - Concatenate and change extension -
i'm trying concatenate files 1.txt , 2.txt, , several html files. i'm trying save them .php
after concatenation after. i've tried follows, doesn't work.
step 1:
sudo find . -name "*.html" -type f -exec ./code.sh {} \;
code.sh
cat 1.txt $1 2.txt > mv $1 `echo $1 | sed 's/\.html/.php/'`;
any ideas how solve this?
your problem you're trying write file called mv
along other parameters.
i think mean code.sh is:
cat 1.txt $1 2.txt > $(echo $1 | sed 's/\.html/.php/')
Comments
Post a Comment