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.

Required fields*

6
  • This work for me. Can you provide some output? Commented Apr 18, 2014 at 4:29
  • where is the dynamic part? You want a different length for certain conditions? It seems like you want to limit all output to one maximum length Commented Apr 18, 2014 at 4:29
  • @awk_FTW Depending on the situation, I have different window settings. At fullscreen, my width is 167. But at other sizes, I will need to be smaller. That's why I want to call ssty to get the size. Commented Apr 18, 2014 at 4:34
  • Try tput rmam; ps aux Commented Apr 18, 2014 at 5:53
  • Some shells like zsh, ksh93 or bash store the terminal width in $COLUMNS Commented Apr 18, 2014 at 5:56