LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-05-2005, 05:27 AM   #1
sangati vishwanath
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Rep: Reputation: 0
Unhappy awk: fatal:cannot open file for reading (no such file or Directory) in Linux


When i tried to run some scripts over Linux, the script used to fail because of this line in scripts:

HOST: $IP

"|awk nc ${IP} 80|awk '/HTTP/ {printf "[1m%s[0m\n",$0}; !/HTTP/ {printf "%s\n",$0}'

read L?"Press ENTER to continue"
echo "\n${UND}PUT${NOR}"
echo "PUT /etc/hosts HTTP/1.1

Where IP is IP address(10.255.114.207) of a network printer.

The error what am observing is

awk: cmd. line:2: fatal: cannot open file `10.255.114.207' for reading (No such file or directory)
Press ENTER to continue
 
Old 07-05-2005, 07:31 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
right.. so that file doesn't exist... not sure what else we're meant to be telling you...
 
Old 07-05-2005, 07:53 AM   #3
sangati vishwanath
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,
Am trying to talk to a network printer with the mentioned IP address, which is not able to connect i suppose, any clues ?
 
Old 07-05-2005, 05:07 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,386

Rep: Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963Reputation: 1963
well it's just wrong... that awk command is expecting a file input, a file with the name of the IP address...

This is one line from a script which is i don't know how big... you've given no context as to how the IP is being interpreted... maybe there is meant to be a file of that name, maybe there isn't.. we've no idea.
 
Old 07-06-2005, 12:59 AM   #5
sangati vishwanath
LQ Newbie
 
Registered: Jul 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Hi Chris,
How i run the script is , i pass the IP address of printer as an argument to the script;
When i try to execute the script pertaining to the Printer,
HOST: will reflect the IP address of printer what i have passed;

HOST: 10.255.114.207

"|awk nc ${10.255.114.207} 80|awk '/HTTP/ {printf "[1m%s[0m\n",$0}; !/HTTP/ {printf "%s\n",$0}';

Will this information be sufficient ?
If not will post the complet flow of script which uses awk in a Perl script.

Thxs
Vishwa
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
libtermcap.so.2: cannot open shared object file: No such file or directory tcma Linux - Software 11 02-24-2012 03:00 AM
**ERROR: [mplex] Unable to open file shrinked.m2v for reading d1l2w3 Programming 2 04-09-2005 05:49 PM
libawt.so: libXp.so.6: cannot open shared object file: No such file or directory man26 *BSD 0 09-10-2004 08:34 AM
postfix: fatal: gethostbyname: No such file or directory cellist Linux - Networking 2 04-16-2004 09:21 PM
ld: cannot open crt1.o: No such file or directory PeterRanson *BSD 4 10-31-2003 11:31 AM


All times are GMT -5. The time now is 02:15 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration