The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Perl, printing a string into columns doubleminus UNIX for Dummies Questions & Answers 5 05-21-2008 09:41 PM
awk printing all columns after (but including) $n cassj UNIX for Dummies Questions & Answers 2 03-05-2008 03:22 PM
printing columns cdunavent Shell Programming and Scripting 3 06-07-2003 11:31 AM
Printing Problems in unix ... ( Bar-cdoe - Ip Printing) QuickSilver UNIX for Advanced & Expert Users 3 06-04-2002 10:48 AM
Printing from unix with lp pmcg UNIX for Dummies Questions & Answers 4 10-23-2001 08:39 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 11-26-2006
Terrible
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Printing Columns in Unix

ok. this is a bit of a difficult question but i've been trying to figure this out for quite some time but couldn't.


how do I print columns on the screen?

like take for instant. using the ls and the file command, how do i print it so i can have the filenames on the left hand side and the type of contents that is in the file on the right hand side. something like this:


ls -l

file filename




foo.bar1 === data
foo.bar2 === data
foo.bar3 === executable script
foo.bar4 === command text


how can i print columns like that and have em actually be aligned properly?

i'm guessing the commands sed, awk, and tput would likely be used here but i cant figure out how to use them properly.
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 02:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0