On Mon, 27 Sep 2021 16:57:26 +0000, Lew Pitcher wrote:
> On Mon, 27 Sep 2021 14:45:32 +0000, Kenny McCormack wrote:
>
>> In article <sis9e1$2konq$
1...@news.xmission.com>,
>> Kenny McCormack <
gaz...@shell.xmission.com> wrote:
>>>In earlier episodes of our saga, I had complained about the lack of a
>>>"split" function in bash. By "split", I mean taking a string and making an
>>>array out of it, as does the AWK "split" function.
>>
>> Note that this same general idea can be used to address another question
>> that I've wrestled with (and posted about) previously: That is, removing
>> leading/trailing blanks from a string in bash. Observe:
>>
>> $ foo=" leading and trailing spaces "
>> $ read -r bar <<< "$foo"
>>
>> In fact, you could even do:
>>
>> $ read -r foo <<< "$foo"
>>
>> to do it "in place".
>
> I suggest that even the "read" is redundant
> foo=" leading and trailing spaces "
> bar=( $foo }