OK I did it. But theres 2 ^J in the way :( Anyhow, I now have CPU/MEM usage displaying in the mode line :) How can I remove these annoying ^J?

(defun cpu-memory-usage () "Display CPU/MEM Usage" (shell-command-to-string "ps -A -o pcpu | tail -n+2 | paste -sd+ | bc && free -t --mega | grep Mem | awk '{print $1,$7}'")) (setq-default mode-line-format (list " %+ " "%b " "=> " "%f " "%o " "- " "[Mode:%m] " '(:eval (format-time-string "- %a %D %R - ")) "CPU: " '(:eval (cpu-memory-usage)))) 
submitted by /u/Danrobi1
[link] [comments]