Linux Software > Linux Application

Ambiguous output redirect issue....

(1/1)

mvas:
 ??? 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

gauravbajaj:
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?

Brianhauro:
Same problem here, on a TP-Link WR1043ND with OpenWRT Backfire. Is there any way for circumventing this issue?
Thanks.

Navigation

[0] Message Index

Go to full version