help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Is there a way to contract y=${x[*]}; "${y// /}" into one li


From: Peng Yu
Subject: [Help-bash] Is there a way to contract y=${x[*]}; "${y// /}" into one line
Date: Fri, 27 May 2016 15:58:07 -0500

Hi, I use the following code to remove spaces from the string of
"${x[*]}". But it requires two lines. Is there a way to do it in one
line? Thanks.

x=(a b c)
y=${x[*]}
echo "${y// /}"

-- 
Regards,
Peng



reply via email to

[Prev in Thread] Current Thread [Next in Thread]