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
International

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

 






Current Newswire:

Netflix Movie Downloads Come to Linux PCs

Our Linux Dream 2008

Will a Linux Certification Help You Get a Linux Job?

WordPress Being Slow, a DNS Problem

Ubuntu or Fedora?

Microsoft's Tired TCO Toffee

WFTL Bytes! for Dec 3, 2008: Now Open Source Is Broken, Viruses Eat Army, Microsoft Buys Friends

IBM Virtual Desktop Bundles Lotus, Ubuntu Linux to Freeze Out Microsoft

Firefox Nightly Beats Chrome in Speed And Webkit Nightly Eats Them For Breakfast.

Intel, Hitachi Make a Splash in Solid State Storage




Unix/Red Hat Systems Adminsitrator
The Computer Merchant, Ltd
US-PA-Lansdale

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

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers