I'm new to scripting concept.. I have a requirement to rename multiple files in a directory like filename.sh.x
into filename.sh
First I tried to get the file names in a particular directory.. so i followed the below scripting code
for entry in PathToThedirectory/*sh.x
do
echo $entry
done
& the above code listed down all the file names with full path..
But my expected o/p is : to get file names alone like abc.sh.x
,
so that I can proceed with the split string mechanism to perform rename
operation easily...
help me to solve this ... Thanks in advance