Skip to main content

Timeline for Simple bash script is not working

Current License: CC BY-SA 4.0

15 events
when toggle format what by license comment
Jun 3, 2019 at 19:39 history became hot network question
Jun 3, 2019 at 14:00 history edited Rui F Ribeiro CC BY-SA 4.0
deleted 134 characters in body
Jun 3, 2019 at 12:55 vote accept Smenov
Jun 3, 2019 at 12:38 history edited muru
edited tags
Jun 3, 2019 at 11:49 answer added filbranden timeline score: 2
Jun 3, 2019 at 11:47 answer added FelixJN timeline score: 1
Jun 3, 2019 at 11:46 answer added deimos timeline score: 2
Jun 3, 2019 at 11:45 comment added steeldriver @Edward unfortunately simply quoting the filenames isn't sufficient - the for loop will already have tokenized the $FILENAMES string on whitespace
Jun 3, 2019 at 11:42 history edited Smenov CC BY-SA 4.0
UPDATE
Jun 3, 2019 at 11:40 comment added Smenov After I entered the filenames as arguments it gives empty strings and did not copy files to $HOME location
Jun 3, 2019 at 11:39 comment added Edward Aside from the readline issue, cp $i $HOME should read cp "$i" "$HOME" to make sure you handle whitespace correctly. Always try to quote Bash variables.
Jun 3, 2019 at 11:35 comment added steeldriver The solution looks incorrect to me - should be read FILENAMES (no $). Aside from the error, there are a number of other issues with the mentor's solution - it will fail for filenames that contain whitespace for example
Jun 3, 2019 at 11:35 comment added Panki Please explain what 'it's not working' means, are you getting an error? Are the files not getting moved? Do they end up somewhere else?
Jun 3, 2019 at 11:30 review First posts
Jun 3, 2019 at 12:13
Jun 3, 2019 at 11:29 history asked Smenov CC BY-SA 4.0