I'm sure a real shell wizard could do a lot better, but at least this is bulletproof:
Code:
#!/bin/sh
# capitalize first letter of all items in current directory:
ls -1 | awk '{gsub("\"","\\\""); system("mv \"" $0 "\" \"" toupper(substr($0,1,1)) substr($0,2) "\"")}'



Edited by mlord (31/03/2008 13:32)