The command fails via bash -c
:
bash -c 'sudo lspci -vvv | awk \'/System peripheral/ {portn=$1} /Status:/ {split($3,a,"M");printf "%s\n",a[1]}\''
-bash: syntax error near unexpected token `('
The same command works well if is run directly in the console sudo lspci -vvv | awk '/System peripheral/ {portn=$1} /Status:/ {split($3,a,"M");printf "%s\n",a[1]}'
How to cover '(' in the command string for bash -c ?