LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 03-04-2003, 12:20 PM   #1
cuss
Member
 
Registered: Dec 2002
Posts: 63

Rep: Reputation: 15
ambiguous redirect?


Hi,

I'm running a command which parses through a perl script and grabs firewall data for me from a specific IP. I do this once a month but today i am getting an "ambiguous redirect" message, and i don't get returned to a prompt. I don't know how long i should wait to see if the script is still being parsed or it is hung. Below is the message. "

-----------------------------------------------------------------------
[root@xxxxxx pix]# . ./filename.sh
calling write_stats with 4854931 records of 4858986
/root/pix/different_filename.sh: : Ambiguous redirect
-----------------------------------------------------------------------

Anyone have a clue as to why i'm getting this message now?

Thanks.
 
Old 03-05-2003, 05:03 AM   #2
Mik
Guru
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Gentoo + LFS
Posts: 1,316

Rep: Reputation: 46
Well without seeing the contents of the script it's kinda hard to tell where it's failing on a redirect. You might want to run it with the following command 'bash -x scriptname'.
That will print the commands as they are run so you can see on what command it's failing.
 
Old 03-05-2003, 02:12 PM   #3
cuss
Member
 
Registered: Dec 2002
Posts: 63

Original Poster
Rep: Reputation: 15
I ran 'bash -x scriptname' (actually, it's still running....been over 6 hours now) and every command is printed as it should be, however, when it gets to the line

/root/pix/script.sh: : Ambiguous redirect

nothing happens. Like i said it's been sitting like this with the cursor at the next line for over 6 hours. There is no printed comment as to where the file may be redirecting to or what line it's choking on. I will probably just kill the process before i leave. I think something should have happened in 6 hours time, no? Any more suggestions?

Thanks.
 
Old 03-06-2003, 08:45 AM   #4
Mik
Guru
 
Registered: Dec 2001
Location: The Netherlands
Distribution: Gentoo + LFS
Posts: 1,316

Rep: Reputation: 46
Well if it's stuck in an endless loop it doesn't matter how long you wait it will stay stuck in an endless loop.

When it runs a script within a script it won't be displaying the commands it's running anymore. Unless you change the startup of the second script also to something like 'bash -x second_script.sh'.

But if it's not some big secret then why don't you post the script so someone could tell you what the script does and possibly where it could be failing.

Last edited by Mik; 03-06-2003 at 08:49 AM.
 
Old 03-06-2003, 10:58 AM   #5
cuss
Member
 
Registered: Dec 2002
Posts: 63

Original Poster
Rep: Reputation: 15
Yeah, i originally wanted to post the script but i don't think that i would be allowed to unfortunately. well i guess i'm stuck for the time being. But i'll see if i can perhaps clean it up a little or something and then post it. Regardless, thanks for your input!
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bash returns ambiguous redirect with date in filename rstoutmna Programming 5 09-13-2011 07:37 PM
Redirect wonderland Linux - Newbie 3 05-24-2004 11:50 PM
Ambiguous output redirect XFox Linux - Newbie 5 10-17-2003 07:29 PM
Ambiguous Redirect Error AMMullan Linux - General 1 10-01-2003 08:39 PM
Ambiguous error messages from fsck, but not from e2fsck jiffydude Linux - Software 2 09-12-2003 06:02 PM


All times are GMT -5. The time now is 05:22 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
Open Source Consulting | Domain Registration