I am trying to sudo a command that uses Awk, and it looks like awk works differently inside sh -c.
echo '1 2' | awk '{print $2}'
2
sh -c "echo '1 2' | awk '{print $2}'"
1 2
Why is this happening?
|
feedback
|
|
You use double quotes, therefore You could for example escape the | |||
feedback
|