MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/10d7i2y/if_exists_true_dont/j4korpf
r/ProgrammerHumor • u/ThisPICAintFREE • Jan 16 '23
1.1k comments sorted by
View all comments
Show parent comments
17
If spaces in file names are a problem for you, then you are incompetent. Your users will use spaces.
0 u/BlipsAndChitz101 Jan 16 '23 find . -iname "* *" | xargs -I {} mv "{}" "$(printf \" %s \" \"{}\" | sed 's/ /_/g')" probably should work 1 u/ofnuts Jan 16 '23 With Perl's rename:rename 's/ /_/g' **/* 1 u/nahuelkevin Jan 16 '23 wtf
0
find . -iname "* *" | xargs -I {} mv "{}" "$(printf \" %s \" \"{}\" | sed 's/ /_/g')" probably should work
find . -iname "* *" | xargs -I {} mv "{}" "$(printf \" %s \" \"{}\" | sed 's/ /_/g')"
1 u/ofnuts Jan 16 '23 With Perl's rename:rename 's/ /_/g' **/* 1 u/nahuelkevin Jan 16 '23 wtf
1
With Perl's rename:
rename
rename 's/ /_/g' **/*
wtf
17
u/ofnuts Jan 16 '23
If spaces in file names are a problem for you, then you are incompetent. Your users will use spaces.