Timeline for Simple Bash Music Player - follow-up
Current License: CC BY-SA 3.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 24, 2015 at 19:01 | vote | accept | Amr Ayman | ||
Jul 24, 2015 at 17:18 | history | edited | h.j.k. | CC BY-SA 3.0 |
added 1879 characters in body
|
Jul 24, 2015 at 8:08 | history | edited | h.j.k. | CC BY-SA 3.0 |
deleted 30 characters in body
|
Jul 24, 2015 at 8:04 | comment | added | h.j.k. |
@AmrAyman that loop is just used as an example to cycle through the valid/invalid $code values to let you see and verify both have the same results. ;) What I'm trying to show is to "put them all within one [[ ... ]] ".
|
|
Jul 24, 2015 at 7:58 | comment | added | Amr Ayman |
About checking yes inputs, I get your point, and I think this command would be more efficient: egrep '^([Yy]|[Yy][Ee][Ss])$' -q <<< "$REPLY" . About the log note, yes I think your implementation is more efficient. About your last simplification, I don't see how that is simpler despite being less efficient as it uses a loop.
|
|
Jul 24, 2015 at 7:58 | comment | added | h.j.k. |
Hmms... I get what you mean, but in your example the quote should have been encoded as %27 ideally... I suppose these are just out of your control...
|
|
Jul 24, 2015 at 7:48 | comment | added | Amr Ayman |
About the numbered attempts to decode a url: Consider this string 'Lil%2BBoy', it will decode from the first attempt to this: 'Lil+Boy' which would clearly mean it's decoded successfully. But some words are decoded several times, like this: 'You%2BWon%2527t%2BBe%2BMissed', try to decode it, it will be: 'You+Won%27t+Be+Missed', decode it again and it will be: 'You+Won't+Be+Missed', implying success. And yes, I do have access to perl but I'm trying to use commands that are more likely to be found on other systems.
|
|
Jul 24, 2015 at 7:19 | history | edited | h.j.k. | CC BY-SA 3.0 |
added 42 characters in body
|
Jul 24, 2015 at 7:13 | history | answered | h.j.k. | CC BY-SA 3.0 |