Fedora Linux Support Community & Resources Center
  #1  
Old 18th November 2008, 09:37 PM
daniel_I_l Offline
Registered User
 
Join Date: Jan 2007
Posts: 131
gawk question

I tried to run the gaek program:
Quote:
BEGIN {
"/inet/tcp/0/localhost/daytime" |& getline
print $0
}
and got the error:
gawk: prog:2: fatal: can't open two way socket `/inet/tcp/0/localhost/daytime' for input/output (No such file or directory)
but when I checked my /etc/services file daytime was listed as a tcp service in socket 13. What could the problem be?
Thanks.
Reply With Quote
  #2  
Old 18th November 2008, 09:48 PM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
/etc/services simply lists the port numbers registered with IANA. You must start a daytime server on your machine to make the command work.
Reply With Quote
  #3  
Old 18th November 2008, 10:01 PM
daniel_I_l Offline
Registered User
 
Join Date: Jan 2007
Posts: 131
How do I start a daytime server? Isn't it supposed to be started at startup?
Thanks.
Reply With Quote
  #4  
Old 19th November 2008, 04:45 AM
RupertPupkin's Avatar
RupertPupkin Offline
Registered User
 
Join Date: Nov 2006
Location: Detroit
Posts: 4,617
The daytime service is not started manually, it's handled by the xinetd service. You just have to enable it.
In the files /etc/xinetd.d/daytime-dgram and /etc/xinetd.d/daytime-stream change the line that says "disable = yes" to "disable = no".
Then reload the xinetd service: /etc/init.d/xinetd reload
Reply With Quote
  #5  
Old 19th November 2008, 09:27 AM
markkuk Offline
Registered User
 
Join Date: Apr 2005
Location: Finland
Posts: 5,076
Quote:
Originally Posted by daniel_I_l View Post
How do I start a daytime server? Isn't it supposed to be started at startup?
Daytime is an obsolete protocol that's mostly used in programming examples because its simplicity. It's useless as a time service. There's no reason to start it automatically at boot and it isn't even installed by default.
Reply With Quote
Reply

Tags
gawk, question

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
Using gawk recursively CD-RW Programming & Packaging 5 10th August 2009 09:36 PM
Grub question and Login (init 3 or 5) question Anla-shok Using Fedora 2 11th June 2006 10:35 PM
GAWK v3.1.4 performance issue awillard69 Using Fedora 0 22nd March 2006 04:15 PM
install hangs at package gawk pigpen Installation and Live Media 3 5th May 2004 10:27 PM


Current GMT-time: 11:53 (Wednesday, 22-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