i wonder if u could help me with fixing bash script which should unhide all hiden files in dir. Where is the problem?
param='.'
for file in $param*; do
mv $file $(echo $file | sed 's/^.\(.*\)/\1/')
done
exit
                This for loop should work:
export GLOBIGNORE=".:.."
for file in .*; do
   mv -n "$file" "${file#.}"
   # mv -n "$file" "${file:1}"
done
PS: Better to backup your files before doing a mass mv/rename
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With