[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Word splitting for $@ in variable assignment
From: |
Alvin Seville |
Subject: |
Word splitting for $@ in variable assignment |
Date: |
Thu, 24 Jun 2021 17:52:47 +1000 |
Hello! I want to understand why the following code doesn't produce any
error:
set -- "a b" "c"
a="$@"
? I expected smth like: main.sh: line 2: b: command not found due to word
splitting according to documentation
<https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Shell-Parameters>.
What am I missing?
--
alvinseville7cf@Alvins-MacBook-Pro ~ $* echo *-e "Best regards, \e[33m$(
whoami)\e[0m."* && exit *$SUCCESS_EC
- Word splitting for $@ in variable assignment,
Alvin Seville <=