Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Looks like awk is indeed a little faster than grep and cut. Thanks! Commented Aug 18, 2014 at 17:36
  • Combined with the stdbuf -o0 trick in my answer, this is the fastest solution here. +1 Commented Aug 18, 2014 at 22:21
  • @paraxor - not anymore. By my tests the sed solution in my own answer and the awk solution here present no difference in execution time - and I also have two displays, so the q makes a significant difference. Each runs at .03 to .04 seconds at every execution - and the addition of stdbuf only slows them down. But xgamma is faster still. Commented Aug 18, 2014 at 22:47
  • @mikeserv adding stdbuf seems to be crucial on my machine. Using @jasonwryan's solution exactly (no stdbuf), I got real 0m0.728s. Adding stdbuf to it gave me real 0m0.126s. However, using your sed solution along with stdbuf as opposed to awk seems to consistently give me another .006s. Commented Aug 19, 2014 at 15:05
  • 1
    @mikeserv That was in the terminal and using awk. Commented Aug 19, 2014 at 15:09