Linux Today: Linux News On Internet Time.
Search Linux Today
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

Linux Today
Enterprise Linux Today
Apache Today
JustLinux.com
Linux Planet
PHPBuilder
All Linux Devices
Technology Jobs

JustTechJobs.com

LinuxToday Newsletters
Server Daily
IT Management Daily
Subscribe News
Subscribe PR
Subscribe Security

internet.com
Internet News
Small Business

Advertise
Newsletters
Tech Jobs
E-mail Offers

 






Current Newswire:

The Linux powered LAN Gaming House

5 Best Android Apps For Reddit Lovers

SECURITY: Flash Player Sandbox Comes to Firefox

The Future of Kubuntu

SECURITY: Symantec should not be afraid of 'open' source code

Linux 3.3 rc3

60 Fantastic Free Android Apps

Ready for Another Linux Tablet? Meet the Rugged Trimble Yuma

How can the layman get involved with free software?

RIM Commits to Open Source BlackBerry 10 Native SDK



Applications Management Engineer Sr (NYC)
Next Step Systems
US-NY-New York

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]) (7072 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