![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| NIM Questions | tb0ne | AIX | 5 | 08-16-2007 07:23 AM |
| Few questions | gina | Shell Programming and Scripting | 2 | 05-28-2007 05:47 AM |
| A few questions... | halluc1nati0n | UNIX for Dummies Questions & Answers | 2 | 03-28-2007 10:29 AM |
| 3 questions in 1 | alikun | UNIX for Dummies Questions & Answers | 2 | 03-27-2007 02:59 AM |
| ftp questions | lewisoco | UNIX for Advanced & Expert Users | 5 | 10-27-2005 05:45 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Questions on AWK
Hi,
Could someone tell me how to use a varible in the one of the sections of the awk command below which adjusts the spacing (i.e. "%-5s%-10s%-15s")? Code:
echo "1 2 3" | awk ' { printf("%-5s%-10s%-15s",$1,$2,$3); printf("\n"); } '
I tried specifying the varible with "-${LENGTH}s%" and "-$LENGTH\s%" but it did not work. Any help will be greatly appreciated. Steve |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|