2198 shaares
909 private links
909 private links
#!/bin/bash
#print the list of all text files
ls *.txt
#Iterate the loop to read all text files
for value in `ls *.txt`;
do
#Read the basename of the file
filename=`basename $value .txt`
#Rename all files to doc files
mv $value $filename.doc;
done
#Print all doc files
ls *.doc