1 Replies - 1406 Views - Last Post: 26 May 2012 - 05:44 PM

#1 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6544
  • View blog
  • Posts: 30,652
  • Joined: 10-May 07

File To Lower Case

Posted 26 May 2012 - 05:44 PM

Description: chmod & execute!Change every file in the current directory to lower case. Useful for if you download Windows or DOS files to a Linux file server.
#!/bin/sh

list=`ls`
for file in ${list}
do
  mv ${file} "${file,,}"
done


Is This A Good Question/Topic? 0
  • +

Replies To: File To Lower Case

#2 no2pencil  Icon User is offline

  • Professor Snuggly Pants
  • member icon

Reputation: 6544
  • View blog
  • Posts: 30,652
  • Joined: 10-May 07

Re: File To Lower Case

Posted 26 May 2012 - 05:44 PM

Description: chmod & execute!Change every file in the current directory to lower case. Useful for if you download Windows or DOS files to a Linux file server.
#!/bin/sh

list=`ls`
for file in ${list}
do
  mv ${file} ${file,,}
done


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1