Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 9th October 2011, 01:17 AM
COKEDUDE Offline
Registered User
 
Join Date: Jan 2011
Posts: 275
linuxfirefox
awk print help

In this:

Code:
$ awk '{ print "var is", var }' var=TEST file1

What does the print part do?

{ print "var is", var }
Reply With Quote
  #2  
Old 9th October 2011, 04:16 PM
stevea's Avatar
stevea Offline
Registered User
 
Join Date: Apr 2006
Location: Ohio, USA
Posts: 8,302
linuxfedorafirefox
Re: awk print help

It's a nil pattern (matches every line of input and a sequence of actions between the {} braces.
Basically it will print
var is TEST
for every line in the file

man awk
describes all this. Full manual here
http://www.gnu.org/software/gawk/manual
__________________
None are more hopelessly enslaved than those who falsely believe they are free.
Johann Wolfgang von Goethe
Reply With Quote
  #3  
Old 10th October 2011, 12:24 AM
satya164's Avatar
satya164 Offline
Registered User
 
Join Date: Jan 2011
Location: Odisha, India
Age: 21
Posts: 55
The print command will print the output to Terminal. Try print 'Hello World'
__________________
My Artwork - http://satya164.deviantart.com
Fedora Utils for Fedora to install Codecs, Java etc. and Tweak the System - http://fedorautils.sf.net
Reply With Quote
  #4  
Old 10th October 2011, 02:23 AM
jpollard Online
Registered User
 
Join Date: Aug 2009
Location: Waldorf, Maryland
Posts: 6,108
linuxfedorafirefox
Re: awk print help

Almost looks like a homework question, doesn't it?
Reply With Quote
Reply

Tags
awk, print

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Print to file/ print to PDF print driver? BillyBoy Using Fedora 3 22nd February 2012 09:42 AM
Gimp: print fails but print of print preview works tashirosgt Using Fedora 0 2nd December 2009 06:24 PM
Can't print with apps who use gnome print dialog - greyed out tedtlogan Using Fedora 3 8th June 2009 01:30 PM


Current GMT-time: 04:07 (Saturday, 25-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat