Timeline for Can a shell script prints its argument, quoted as you would write them on the shell prompt?
Current License: CC BY-SA 4.0
7 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jun 3, 2018 at 15:53 | comment | added | Jeff | @ilkkachu Duly noted! That's why (among other reasons) that I upvoted all of the previous answers. Also why I added this use case. Hopefully the perfect is not the enemy of the good. | |
| Jun 3, 2018 at 15:39 | history | edited | Jeff | CC BY-SA 4.0 | change heading |
| Jun 3, 2018 at 15:39 | comment | added | ilkkachu | Just note that quoting with double-quotes isn't very helpful in protecting backslashes, $-expansions and other double-quotes. That's why the other answers use single quotes while going to some lengths to handle single quotes inside the string, or use the shell's own features for producing a quoted copy of the string. | |
| Jun 3, 2018 at 15:26 | history | edited | Jeff | CC BY-SA 4.0 | add a use case |
| Jun 3, 2018 at 15:04 | history | edited | Jeff | CC BY-SA 4.0 | add explanation of what the code is doing |
| Jun 3, 2018 at 1:46 | review | Low quality posts | |||
| Jun 3, 2018 at 2:10 | |||||
| Jun 3, 2018 at 1:28 | history | answered | Jeff | CC BY-SA 4.0 |