Is there a way to execute
ps ax | grep java without it wrapping on the terminal?
However, you can set the screen width like this to truncate the output (but it won't override
You can also use the
I am not able to comment on Dennis Williamson's answer (maybe I have too few points for that); that's why I am writing a new answer.
You can do
to get the output width adjusted according to the current terminal size. If your favorite shell does not support COLUMNS environmental variable, you can use stty:
or more specifically (using single awk but making stronger assumption on the stty -a output format):
All this is quite a bit of typing, so you might want to consider making the above an alias or a shell function... :-) The above maybe needs to be adjusted for your operating system (I cannot test now, I am not using OS X but Linux). I have the following output for stty -a: