Sponsored Content
Top Forums Shell Programming and Scripting Getting unknown operator error while using a function Post 302995814 by Samah on Thursday 13th of April 2017 04:15:16 AM
Old 04-13-2017
Thanks for the response Aia.

You mean to say, there is no problem with defined function and only the double quotes are causing issue?

Even i tried without quotes, it is not working.
 

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

syntax error in shell test: unknown operator

Hi All, can some one figure out the syntax issue here. How to overcome this? #!/bin/sh $ HFR_MAIL=NO $ PRP_MAIL=NO $ MC_MAIL=NO $ if && && ]; then > echo "NO " > else > echo "YES" > fi test: unknown operator NO $ if && && ]; then > echo "NO" > else > echo "YES" >... (4 Replies)
Discussion started by: shellscripter
4 Replies

5. 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

6. 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

7. Shell Programming and Scripting

Unknown error - ``' unmatched

Hi Guys, I get the error while running below commands. Earlier the command used to execute, but after enclosing them in a function, the error is occuring backupPath=`echo $folderName | sed -e 's,/vobs/dte/itgClient/client/RegressionTestLibPostOHS/,,'` check_event=`cat... (7 Replies)
Discussion started by: ajincoep
7 Replies

8. 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

9. 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

10. 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
masqmail.aliases(5)						   File Formats 					       masqmail.aliases(5)

NAME
masqmail.aliases - masqmail alias file format DESCRIPTION
This man page describes the format of the masqmail alias file. Its usual location is /etc/aliases. FILE FORMAT
The alias file consists of lines of the form: local_part: item1, item2, ... Items can be surrounded by double quotes `"'. If within the quotes other quotes are needed for an address they can be escaped with a leading backslash `'. A leading backslash `' indicates that this address shall not be further expanded. A leading pipe symbol `|' indicates that the item shall be treated as a pipe command. The content of the message will then be sent to the standard input of a command. The command will run under the user id and group id masqmail is running as. If quotes are needed, the pipe symbol must appear within the quotes. Loops will be detected, the offending address will be ignored. Aliases will be expanded at delivery time. This means that if there is a message still in the queue and you change any alias which matches one of the recipient addresses, the change will have effect next time a delivery is attemped. There is no need to restart masqmail or run any command when the alias file has been changed. AUTHOR
Masqmail was written by Oliver Kurth. It is now maintained by Markus Schnalke <meillo@marmaro.de>. You will find the newest version of masqmail at http://marmaro.de/prog/masqmail/. There is also a mailing list, you will find information about it at masqmail's main site. BUGS
Please report bugs to the mailing list. SEE ALSO
masqmail.conf(5), masqmail(8), masqmail-0.2.30 2011-07-27 masqmail.aliases(5)
All times are GMT -4. The time now is 04:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy