Answer the question
In order to leave comments, you need to log in
Why is the output of echo not being written to a variable (bash)?
Here is the code:
for word in $allUsers; do
tmpStr=$(echo '{"{#EMAIL}":"'$word'"}' | python -lmjson.tool)
echo $tmpStr
done
Unknown option: -l
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.
echo '{"{#EMAIL}":"'$word'"}' | python -mjson.tool
echo '{"{#EMAIL}":"'$word'"}' | python -mjson.tool
{
(indent here)"{#EMAIL}": "[email protected]"
}
tmpStr+=$(echo '{"{#EMAIL}":"'$word'"}' | python -mjson.tool)
echo $tmpStr
{ "{#EMAIL}": "[email protected]" }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question