The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
AWK how to strip from right hand side angelolamberti Shell Programming and Scripting 5 01-17-2008 04:31 AM
Need a hand. Please? alexcol Shell Programming and Scripting 1 09-26-2006 01:59 PM
How to get the most left hand string ?? jfortes Shell Programming and Scripting 2 09-11-2006 01:47 PM
hand needed about FTP service on SCO UNIX blf0 UNIX for Dummies Questions & Answers 4 03-13-2006 03:58 AM
Lets give Neo a hand. Optimus_P Post Here to Contact Site Administrators and Moderators 4 10-24-2003 06:37 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-06-2002
Registered User
 

Join Date: May 2002
Posts: 4
Give us a hand

How do you get an awk output into columns i.e.
awk (print $1,$2,$3) doesn't come out into nice columns but lots of lines of txt want something more like.

I am crap
at unix so
give me a
hand thx Rich
Forum Sponsor
  #2 (permalink)  
Old 05-06-2002
Kelam_Magnus's Avatar
Unix does a body good.
 

Join Date: Aug 2001
Location: DFW McKinney, TX,
Posts: 1,069
You are really close to the actual syntax of awk...

If you read the man page for awk you will see examples at the bottom. Try '{ }' instead of braces ( ) and put the filename after the end of the }' with a space after the '



__________________
My brain is your brain
  #3 (permalink)  
Old 05-06-2002
thehoghunter
Guest
 

Posts: n/a
To format the output, use printf instead of print. Check the awk and format man page for more assistance.
  #4 (permalink)  
Old 05-06-2002
Registered User
 

Join Date: May 2002
Posts: 4
thanks

Im nearly there, thx very much just trying to work out what
printf '{"%4s %4d %3s/n", $1, $2, $3}'. what exactly the %4s %4d %3s/n all stands for any more help would be greatly appreciated.

Rich
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:31 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0