Skip to main content
8 events
when toggle format what by license comment
Oct 3, 2023 at 21:12 vote accept Maxhawk
Oct 1, 2023 at 16:38 history closed Marcus Müller
Stephen Kitt
ilkkachu
Kusalananda
Duplicate of Why *not* parse `ls` (and what to do instead)?, Why does my shell script choke on whitespace or other special characters?
Sep 30, 2023 at 20:04 answer added qqqq timeline score: 0
Sep 30, 2023 at 19:40 review Close votes
S Oct 1, 2023 at 16:42
Sep 30, 2023 at 19:20 comment added Gilles Quénot Learn how to quote properly in shell: > "Double quote" every literal that contains spaces/metacharacters and every expansion: "$var", "$(command "$var")", "${array[@]}", "a & b". Use 'single quotes' for code or literal $'s: 'Costs $5 US', ssh host 'echo "$HOSTNAME"'. See <mywiki.wooledge.org/Quotes> <mywiki.wooledge.org/Arguments> <web.archive.org/web/20230224010517/https://…> when-is-double-quoting-necessary
Sep 30, 2023 at 19:18 comment added Gilles Quénot Like @Shelter usually says: good luck... DO NOT USE ls output for anything. ls is a tool for interactively looking at directory metadata. Any attempts at parsing ls output with code are broken. Globs are much more simple AND correct: for file in *.txt. Read mywiki.wooledge.org/ParsingLs
S Sep 30, 2023 at 19:15 review First questions
S Oct 1, 2023 at 16:42
S Sep 30, 2023 at 19:15 history asked Maxhawk CC BY-SA 4.0