Any cleaner way to write the following alias with respect to escaping?
alias bs="echo \'{'\"'account'\"':'\"'a1'\"','\"'portfolio'\"':'\"'p1'\"'}\' | nc 0 9000"
Yikes, that’s pretty ugly; but it works. When I expand the alias (with C-M-e) I want this exact result:
echo '{"account":"a1","portfolio":"p1"}' | nc 0 9000
I’m curious to know if I’m missing a trick: curious, mostly.
Does it have to be an alias?