I want to make a command that will cd then ls if the dir contents will fit in one terminal line and if not will display number of items in dir how do I do that.
Name:
Anonymous2009-04-12 15:28
>>5
Enjoy rewriting most of the display logic in ls in your bash script.
However, two hints:
echo $COLUMNS tput cols
The rest is just simple math and a lot of writing.