Showing posts with label unix. Show all posts
Showing posts with label unix. Show all posts
Wednesday, November 24, 2010
Friday, August 22, 2008
Convert a set of file extensions
I was wondering how to convert a set of txt files to doc
this could be done using this shell script:
example:
for x in *.txt;
do mv "$x" "${x%.txt}.doc";
done
steps to reproduce:
# touch 1.txt 2.txt 3.txt
# for x in *.txt;do mv "$x" "${x%.txt}.doc"; done
# ls
1.doc 2.doc 3.doc
this could be done using this shell script:
example:
for x in *.txt;
do mv "$x" "${x%.txt}.doc";
done
steps to reproduce:
# touch 1.txt 2.txt 3.txt
# for x in *.txt;do mv "$x" "${x%.txt}.doc"; done
# ls
1.doc 2.doc 3.doc
Subscribe to:
Posts (Atom)