I'm trying to add the following to my .bashrc:
cpu_info() { top -b -n1 | grep Cpu(s) | awk '{print $2 + $4}' } but bash is telling me:
bash: .bashrc: line 131: syntax error near unexpected token `(' bash: .bashrc: line 131: ` top -b -n1 | grep Cpu(s) | awk '{print $2 + $4}'' the command works fine in the terminal, not sure why its breaking in my bash script
any ideas?