December 04, 2024, 11:47:54 AM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Ambiguous output redirect issue....  (Read 30829 times)

Offline mvas

  • New Member
  • Posts: 3
Ambiguous output redirect issue....
« on: November 15, 2011, 09:58:30 AM »
 ??? hi guys,

I'm trying to use a script that returns the name of the application server host that serviced the request.
I intend to use this one to check which server is used through the 3DNS call...
Calling this script repeatedly should cycle round the app servers within the JBOSS cluster.
(the box is using the csh shell)

curl -G --insecure "<URL goes here>" 2>/dev/null | awk ' BEGIN{FS="("}{ print $2 } ' | sed -e "s/).*//" 2>/dev/null

The script always return:
Ambiguous output redirect.

As you can figure out... scripts is not exactly my strong point....
I'm just trying to reuse this script, but in my case is not working...
Any ideas of whats wrong are more than welcome...

many thanks,

mike

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Re: Ambiguous output redirect issue....
« Reply #1 on: December 21, 2011, 10:00:11 PM »
Prob its shell problem ( not ur script) . I am pretty sure that csh doesn't like the redirection ( 2>/dev/null)

Try in bash it would work. If you need to run only in csh then try replacing ( 2>/dev/null)  with below
>& \dev\nul

and see it helps?

Offline Brianhauro

  • Linux Noob !
  • *
  • Posts: 6
Ambiguous output redirect issue
« Reply #2 on: March 16, 2019, 11:27:53 AM »
Same problem here, on a TP-Link WR1043ND with OpenWRT Backfire. Is there any way for circumventing this issue?
Thanks.