Could you please help me get from
inputs='["some string", "BBB", "CCC", "something else"]'
to
inputs=( "some string" "BBB" "CCC" "something else" )
using some bash code?
Thank you.
Later Edit: The result should be a bash array. as per solutions provided by @james and @Francois, they create just a string.
Any ideas? Thanks again.
echo $inputs | sed -e "s/\[/( /" -e "s/\]/ )/"?inputs='["some string", "BBB", "CCC", "something else"]'comes as a result from a ruby code and what I need is to transform that string into a bash array.