Sponsored Content
Top Forums Shell Programming and Scripting syntax error in shell test: unknown operator Post 302302452 by shellscripter on Tuesday 31st of March 2009 03:28:07 AM
Old 03-31-2009
Hi All,

Thanks for your quick response which helps me a lot. I have tried using BASH shell

if [[ "$HFR_MAIL" == "NO" && "$PRP_MAIL" == "NO" && "$MC_MAIL" == "NO" ]]; then

It worked fine.

Regards,
Parkkavan
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

:0: unknown test operator

I have gotten the script up to this point and it works fine a system but when i copy it to another unix server running solaris 9 as the original one , its gives an error './mon_fs.sh: 0: unknown test operator' . (see script bellow) can the Gurus see to this as i am just a beginner with... (2 Replies)
Discussion started by: ibroxy
2 Replies

2. UNIX for Advanced & Expert Users

unknown test operator

Hi, I have the following shell script : Nbr_BD_Link=0 Nbr_BD_Link=` sqlplus sysadm/${PSWD}@${DB_Name} << EOF | tail -4 | head -1 2>/dev/null set head off feedback off ; select count(*) from dba_db_links ; exit ; EOF ` echo ${Nbr_BD_Link} if ; then ... (4 Replies)
Discussion started by: big123456
4 Replies

3. Shell Programming and Scripting

test: unknown operator status

hi I get test: unknown operator status if then echo "OK." return 0 else echo "not ok" 2>&1 exit -1 fi I tried to change "A" with 'A' --> same error I tried to change if , I am getting: (3 Replies)
Discussion started by: melanie_pfefer
3 Replies

4. Shell Programming and Scripting

if returns "unknown test operator"

Greetings, using ksh on Solaris, I am trying to identify the current version of a package installed on multiple servers using if statement in a precursor to upgrading. I have searched the forums and have found many hits, reviewed 3 pages and have tried the different variations noted there. Also... (3 Replies)
Discussion started by: 22blaze
3 Replies

5. Shell Programming and Scripting

unknown test operator

hi all, i am using the below command in my script if ; then This statement is causing the problme "ScriptName.ksh: XXX-XXX: unknown test operator" could you please suggest me , how can i avoid these messages. Singhal (7 Replies)
Discussion started by: singhald
7 Replies

6. Programming

Help Unknown Syntax Error

Please excuse me if this is an easy fix, for I am new to Unix and C '/problem1.c: line2: syntax error near unexpected token ` '/problem1.c: line2: `main() and for one program it has : command not found2: (above the syntax error) As mentioned this is in C not C++, I have complied all... (3 Replies)
Discussion started by: apolo93
3 Replies

7. Shell Programming and Scripting

Unknown test operator

Hi , Os - Solaris Shell - Ksh I am getting below error in if condition + id + ./om_wf_complete.sh: gid=4081(Infadmn): unknown test operator + exit 1 if ; then touch /home/odwt/1.0.0/out/oworkflow.dat chmod 777 /home/odwt/1.0.0/out/oworkflow.dat elif ; then touch... (8 Replies)
Discussion started by: nag_sathi
8 Replies

8. Shell Programming and Scripting

Unknown test operator

O/S solaris 9 shell ksh if then chk_op="WARNING...reboot within the last 24hrs, restarted at `who -r | awk '{print $4$5"@"$6}'`" ; else if ; then last_reboot1=`who -b | awk '{print $4" "$5" "$6}'` last_reboot2='..OK..'`uptime | awk '{print$3" "$4}'` ... (4 Replies)
Discussion started by: squrcles
4 Replies

9. Shell Programming and Scripting

Getting syntax error with awk ternary operator

split($7,a," "); date = a; time = a split(date,d,"/"); month = sprintf("%02d",d); day = sprintf("%02d",d); year = 2000 + d % 100 split(time,t,":"); hour=t; min=t hour >= 12? { hour=hour-12; amPm=" PM" } : amPM=" AM" hour == 0? hour=12 time=sprintf("%02d",hour)":"sprintf("%02d",min)amPm ... (4 Replies)
Discussion started by: Michael Stora
4 Replies

10. Shell Programming and Scripting

Getting unknown operator error while using a function

Hi, I wrote a function for the first time and not able to get the desired result. I have requirement to execute 10 queries. For this i wrote a function like below. function Command { typeset var SOL; if ; then CONNECTION="${CONNECTION} -e -time"; else SOL="`nzsql ${CONNECTION} -c... (8 Replies)
Discussion started by: Samah
8 Replies
Event(3pm)						User Contributed Perl Documentation						Event(3pm)

NAME
Net::IRC::Event - A class for passing event data between subroutines SYNOPSIS
None yet. These docs are under construction. DESCRIPTION
This documentation is a subset of the main Net::IRC documentation. If you haven't already, please "perldoc Net::IRC" before continuing. Net::IRC::Event defines a standard interface to the salient information for just about any event your client may witness on IRC. It's about as close as we can get in Perl to a struct, with a few extra nifty features thrown in. METHOD DESCRIPTIONS
This section is under construction, but hopefully will be finally written up by the next release. Please see the "irctest" script and the source for details about this module. LIST OF EVENTS
Net::IRC is an entirely event-based system, which takes some getting used to at first. To interact with the IRC server, you tell Net::IRC's server connection to listen for certain events and activate your own subroutines when they occur. Problem is, this doesn't help you much if you don't know what to tell it to look for. Below is a list of the possible events you can pass to Net::IRC, along with brief descriptions of each... hope this helps. Common events o nick The "nick" event is triggered when the client receives a NICK message, meaning that someone on a channel with the client has changed eir nickname. o quit The "quit" event is triggered upon receipt of a QUIT message, which means that someone on a channel with the client has disconnected. o join The "join" event is triggered upon receipt of a JOIN message, which means that someone has entered a channel that the client is on. o part The "part" event is triggered upon receipt of a PART message, which means that someone has left a channel that the client is on. o mode The "mode" event is triggered upon receipt of a MODE message, which means that someone on a channel with the client has changed the channel's parameters. o topic The "topic" event is triggered upon receipt of a TOPIC message, which means that someone on a channel with the client has changed the channel's topic. o kick The "kick" event is triggered upon receipt of a KICK message, which means that someone on a channel with the client (or possibly the client itself!) has been forcibly ejected. o public The "public" event is triggered upon receipt of a PRIVMSG message to an entire channel, which means that someone on a channel with the client has said something aloud. o msg The "msg" event is triggered upon receipt of a PRIVMSG message which is addressed to one or more clients, which means that someone is sending the client a private message. (Duh. :-) o notice The "notice" event is triggered upon receipt of a NOTICE message, which means that someone has sent the client a public or private notice. (Is that sufficiently vague?) o ping The "ping" event is triggered upon receipt of a PING message, which means that the IRC server is querying the client to see if it's alive. Don't confuse this with CTCP PINGs, explained later. o other The "other" event is triggered upon receipt of any number of unclassifiable miscellaneous messages, but you're not likely to see it often. o invite The "invite" event is triggered upon receipt of an INVITE message, which means that someone is permitting the client's entry into a +i channel. o kill The "kill" event is triggered upon receipt of a KILL message, which means that an IRC operator has just booted your sorry arse offline. Seeya! o disconnect The "disconnect" event is triggered when the client loses its connection to the IRC server it's talking to. Don't confuse it with the "leaving" event. (See below.) o leaving The "leaving" event is triggered just before the client deliberately closes a connection to an IRC server, in case you want to do any- thing special before you sign off. o umode The "umode" event is triggered when the client changes its personal mode flags. o error The "error" event is triggered when the IRC server complains to you about anything. Sort of the evil twin to the "other" event, actu- ally. CTCP Requests o cping The "cping" event is triggered when the client receives a CTCP PING request from another user. See the irctest script for an example of how to properly respond to this common request. o cversion The "cversion" event is triggered when the client receives a CTCP VERSION request from another client, asking for version info about its IRC client program. o csource The "csource" event is triggered when the client receives a CTCP SOURCE request from another client, asking where it can find the source to its IRC client program. o ctime The "ctime" event is triggered when the client receives a CTCP TIME request from another client, asking for the local time at its end. o cdcc The "cdcc" event is triggered when the client receives a DCC request of any sort from another client, attempting to establish a DCC connection. o cuserinfo The "cuserinfo" event is triggered when the client receives a CTCP USERINFO request from another client, asking for personal informa- tion from the client's user. o cclientinfo The "cclientinfo" event is triggered when the client receives a CTCP CLIENTINFO request from another client, asking for whatever the hell "clientinfo" means. o cerrmsg The "cerrmsg" event is triggered when the client receives a CTCP ERRMSG request from another client, notifying it of a protocol error in a preceding CTCP communication. o cfinger The "cfinger" event is triggered when the client receives a CTCP FINGER request from another client. How to respond to this should best be left up to your own moral stance. o caction The "caction" event is triggered when the client receives a CTCP ACTION message from another client. I should hope you're getting the hang of how Net::IRC handles CTCP requests by now... CTCP Responses o crping The "crping" event is triggered when the client receives a CTCP PING response from another user. See the irctest script for an example of how to properly respond to this common event. o crversion The "crversion" event is triggered when the client receives a CTCP VERSION response from another client. o crsource The "crsource" event is triggered when the client receives a CTCP SOURCE response from another client. o crtime The "crtime" event is triggered when the client receives a CTCP TIME response from another client. o cruserinfo The "cruserinfo" event is triggered when the client receives a CTCP USERINFO response from another client. o crclientinfo The "crclientinfo" event is triggered when the client receives a CTCP CLIENTINFO response from another client. o crfinger The "crfinger" event is triggered when the client receives a CTCP FINGER response from another client. I'm not even going to consider making a joke about this one. DCC Events o dcc_open The "dcc_open" event is triggered when a DCC connection is established between the client and another client. o dcc_update The "dcc_update" event is triggered when any data flows over a DCC connection. Useful for doing things like monitoring file transfer progress, for instance. o dcc_close The "dcc_close" event is triggered when a DCC connection closes, whether from an error or from natural causes. o chat The "chat" event is triggered when the person on the other end of a DCC CHAT connection sends you a message. Think of it as the private equivalent of "msg", if you will. Numeric Events o There's a whole lot of them, and they're well-described elsewhere. Please see the IRC RFC (1495, at http://cs-ftp.bu.edu/pub/irc/sup- port/IRC_RFC ) for a detailed description, or the Net::IRC::Event.pm source code for a quick list. AUTHORS
Conceived and initially developed by Greg Bacon <gbacon@adtran.com> and Dennis Taylor <dennis@funkplanet.com>. Ideas and large amounts of code donated by Nat "King" Torkington <gnat@frii.com>. Currently being hacked on, hacked up, and worked over by the members of the Net::IRC developers mailing list. For details, see http://www.execpc.com/~corbeau/irc/list.html . URL
Up-to-date source and information about the Net::IRC project can be found at http://netirc.betterbox.net/ . SEE ALSO
o perl(1). o RFC 1459: The Internet Relay Chat Protocol o http://www.irchelp.org/, home of fine IRC resources. perl v5.8.8 2008-01-24 Event(3pm)
All times are GMT -4. The time now is 01:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy