Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Formatting script output into columns

Status
Not open for further replies.

pfildes

Programmer
Jun 17, 2004
54
0
0
GB
In my script I have created a list of subdirectories. How can I present this list formatted in to four columns?

i.e.
Folder1 Folder2 Folder3 Folder4
Folder5 Folder6 Folder7 Folder8

So far I have the following;
Code:
for tmpDIR1 in `ls -l /opt/myapp | grep '^d' |awk '{print $9}'`; do
	if [ -d "/opt/myapp/$tmpDIR1/app" ]; then
		echo $tmpDIR1
	fi
done
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top