hi all,
is there an EASY and SURE way to translate (stupid)filenames containing spaces, [ ` ^ $ \ ; " ' & * % | > < all-brakets ] + special chars >127 and so on
to standard unix filenames, changing this characters BUT preserving the (unique)name ? exemple:
'\\ab` \234 ab' -> __ab1____x_ab
'\\ab^ \234 ab' -> __ab2____x_ab
sure in c, using opendir(), readdir(), char *xx on filename to check all characters and changing them, then re-readdir() to assure the new name
is unique ... i am looking for an one-liner sh|sed|awk|perl script.
thanks a lot.
ira
PS: we have a lot of users not knowing, they are writing dos-files on a unix server
is there an EASY and SURE way to translate (stupid)filenames containing spaces, [ ` ^ $ \ ; " ' & * % | > < all-brakets ] + special chars >127 and so on
to standard unix filenames, changing this characters BUT preserving the (unique)name ? exemple:
'\\ab` \234 ab' -> __ab1____x_ab
'\\ab^ \234 ab' -> __ab2____x_ab
sure in c, using opendir(), readdir(), char *xx on filename to check all characters and changing them, then re-readdir() to assure the new name
is unique ... i am looking for an one-liner sh|sed|awk|perl script.
thanks a lot.
ira
PS: we have a lot of users not knowing, they are writing dos-files on a unix server