Linux Today: Linux News On Internet Time.
Search Linux Today
search.internet.com
Linux News Sections:  Blog -  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Preferences
Contribute
Link to Us
Search
Linux Jobs

Become a Marketplace Partner

internet.commerce
Be a Commerce Partner














The Linux Channel at internet.com
Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Subscribe News
Subscribe PR
Subscribe Security

internet.com
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

 






Current Newswire:

Sifting Through Billions and Billions of Bytes

Miro 2.0 - Watch TV Podcasts and Videos in HD

Hands off the Gimp

Course: Using LDAP

Bazaar for Subversion users, part 1 - the basics

Firefox 3.5 - A Really Impressive Release

Linux Migration Guide: Finding Linux Equivalents to Your Favorite Windows Programs

Tiny Core Linux 2.1 Review

5 Top of the Line Twitter Desktop Clients for Linux

SECURITY: How Microsoft benefits from Conficker




Senior Windows Engineer (NC)
Next Step Systems
US-NC-Charlotte

Justtechjobs.com Post A Job | Post A Resume
:Intro to Awk, the Great Language with a Strange Name
Intro to Awk, the Great Language with a Strange Name
Jul 16, 2008, 06 :30 UTC (0 Talkback[s]) (5879 reads)

(Other stories by Daniel Robbins)

[ Thanks to LinucksGirl for this link. ]

"As you can see, awk prints out the first and third fields of the /etc/passwd file, which happen to be the username and uid fields respectively. Now, while the script did work, it's not perfect -- there aren't any spaces between the two output fields! If you're used to programming in bash or python, you may have expected the print $1 $3 command to insert a space between the two fields. However, when two strings appear next to each other in an awk program, awk concatenates them without adding an intermediate space. The following command will insert a space between both fields:"

Complete Story

Related Stories:
Double Spacing In Awk, Perl and Shell on Linux and Unix(Jul 09, 2008)
Variable MultiLine Spacing With Sed On Linux Or Unix(Jul 08, 2008)
Simple Arithmetic In Bash, Perl and Awk--More Porting(May 29, 2008)
Linux.com: CLI Magic: Learn to Talk awk(Jan 18, 2006)



No talkbacks posted.
  Home | Search Talkbacks | Customize View    Top of Page  



Enter your comments below:

* Your Name:

* Your Email Address:

* Subject:

CC: [will also send this talkback to an E-Mail address]

* Comments:

Tags allowed:<I>,<B> and <U>. See our talkback-policy for more about talkback content.

Fields marked with * are required!






..............................




All times are recorded in UTC.
Linux is a trademark of Linus Torvalds.
Powered by Linux, Apache and PHP