Gebruikershulpmiddelen

Site-hulpmiddelen


hobby:bash:start

Bash

rename a_file to lower case

For each file a_file in current directory rename a_file to lower case.

for a_file in *;do mv -v "$a_file" `echo "$a_file" | tr [:upper:] [:lower:]` ;done; 

1) For upper case reverse the arguments to [:lower:] [:upper:]

for a_file in *;do mv -v "$a_file" `echo "$a_file" | tr [:lower:] [:upper:]` ;done; 
hobby/bash/start.txt · Laatst gewijzigd: 2020/10/16 15:41 door blaauwgeers