Timeline for For loop for renaming files with prompt for each filename
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Sep 6, 2013 at 22:15 | history | edited | Gilles 'SO- stop being evil' |
edited tags
|
|
| S Sep 6, 2013 at 11:12 | history | suggested | Raphael Ahrens | CC BY-SA 3.0 |
added some words and formatting
|
| Sep 6, 2013 at 9:57 | comment | added | frostschutz | If you quoted properly everywhere, you wouldn't have to remove spaces in the first place. | |
| Sep 6, 2013 at 9:55 | answer | added | frostschutz | timeline score: 2 | |
| Sep 6, 2013 at 9:32 | vote | accept | ispasov | ||
| Sep 6, 2013 at 9:15 | history | tweeted | twitter.com/#!/StackUnix/status/375910087552159745 | ||
| Sep 6, 2013 at 8:50 | review | Suggested edits | |||
| S Sep 6, 2013 at 11:12 | |||||
| Sep 6, 2013 at 8:43 | comment | added | zrajm |
And if you're using bash (or zsh for that matter) then the sed invocation is not necessary either. Use ${f// /_} to replace all occurances of space with underscore in $f.
|
|
| Sep 6, 2013 at 8:40 | comment | added | zrajm |
The echo command in $(echo ${x%*.*}) is completely superfluous. – And if you're just looking to remove the file extension you should not be using *.* (which is only incidentally working because the first asterisk is matching zero characters every time), instead use .*. I.e. $(echo ${x%*.*}) should be ${x%.*}.
|
|
| Sep 6, 2013 at 8:33 | answer | added | zrajm | timeline score: 3 | |
| Sep 6, 2013 at 8:28 | history | edited | manatwork | CC BY-SA 3.0 |
formatted, thanks removed
|
| Sep 6, 2013 at 8:24 | history | asked | ispasov | CC BY-SA 3.0 |