1

I want to have a custom 'watch' command that also includes the output of a single round of top -n 1, but the escape characters do not translate well. Is there a way to disable the bold font of the top command in Ubuntu?

3

Use -b ("Batch-mode operation"):

top -b -n1
  • This will output many lines. This can be restricted with the -w switch together with the LINES environment variable: LINES=20 top -b -w -n1 shows max. 20 lines. – PerlDuck Jun 9 '18 at 18:17
  • This does exactly what i need. A clean output without any escape characters. Thank you! – user2724383 Jun 9 '18 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.