I had three sed commands which are
sed 's/"//g'
sed 's/ *//g'
echo $1 | sed 's/.*'$2':\([^,}]*\).*/\1/'
How can I combine the above three sed commands together?
I had three sed commands which are
sed 's/"//g'
sed 's/ *//g'
echo $1 | sed 's/.*'$2':\([^,}]*\).*/\1/'
How can I combine the above three sed commands together?
To join sed
command, you can also use ;
without the -e
like this:
sed 'code;code;code' file
eks:
sed 's/"//g;s/ *//g' file