Sponsored Content
Top Forums Shell Programming and Scripting Help with error "por: 0403-012 A test command parameter is not valid." Post 302795303 by Yoda on Wednesday 17th of April 2013 02:09:08 PM
Old 04-17-2013
I noticed that you are selecting string: 'MAILS PENDING : ' and concatenating with count(*), this will result in having an alphanumeric value in variable: VAR1:
Code:
SELECT   'MAILS PENDING  :  ' || COUNT ( * )   "Correo Por Enviar" FROM
SCHEMA.CSIC_MAILS_fOR_SEND@VIRT.DB.TGU.COM  WHERE   estado = 0;

So if you try to do a numeric comparison: if [ $VAR1 -ge 200 ] it will fail because you have alphanumeric value in this variable.

I suggest you to modify your query to get just the record count:
Code:
SELECT COUNT(*) FROM
SCHEMA.CSIC_MAILS_fOR_SEND@VIRT.DB.TGU.COM  WHERE estado = 0;

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help regarding Error message: A test command parameter is not valid

Hi I am getting few messages when trying to run my script from the following lines in the script if test then // SomeCode fi The messages are as follows: testing.sh: OBLIGOR_GROUP_ID: 0403-012 A test command parameter is not valid. testing.sh:... (5 Replies)
Discussion started by: skyineyes
5 Replies

2. Shell Programming and Scripting

grep "\012$" problem

Hi, I am trying to weed out DOS '^M' new-line characters from a file which I copied from windows inside my Linux box, using this following script. But it seems this script is not working properly if I have made a check 'xargs grep -l "\012$"'. Here, I am trying to filter only the files which... (4 Replies)
Discussion started by: royalibrahim
4 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

4. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

5. Shell Programming and Scripting

A test command parameter is not valid

Hello, Getting error "A test command parameter is not valid" when trying to run the code below under /sbin/sh AA = "12:00" CHK=$(date +"%H:%M") if then print "Yes" fi Getting 2 errors: 1) "AA: not found" 2) "Specify a parameter with this command" Thanks, IS Please... (5 Replies)
Discussion started by: schureki
5 Replies

6. Shell Programming and Scripting

if condition error: test: 0403-004 Specify a parameter with this command

Hi all, I would like to ask if there's something wrong with my if - else condition, i couldn't run the script perfectly due to the error in my if - else condition stating that "test: 0403-004 Specify a parameter with this command." below is the snippet of my script if && && ] then echo... (5 Replies)
Discussion started by: jihmantiquilla
5 Replies

7. Shell Programming and Scripting

Error passing parameter in "sub" command in awk

I have to replace the pattern found in one file in another file with null/empty "" if found on the fields 3 or 4 ONLY File 1 ==== 10604747|Mxdef|9999|9999|9999|2012-03-04 00:00:59 10604747|Mcdef|8888|9999|8888|2012-03-04 00:00:59 . . . File 2 ==== 9999 8888 . . . Expected... (7 Replies)
Discussion started by: machomaddy
7 Replies

8. Shell Programming and Scripting

A test command parameter is not valid, when special characters are tried to match

Hi I have a scenario where hyphen(-) from file should be ignored I used the following code if && ; then if ; then pow=$LINE echo $pow > history.txt flag=1 fi fi I get the following output ./valid.sh: -: 0403-012 A test... (7 Replies)
Discussion started by: Priya Amaresh
7 Replies

9. UNIX for Dummies Questions & Answers

What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?

Please can you help me understand the significance of providing arguments under sh -s in > ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh (4 Replies)
Discussion started by: Sree10
4 Replies

10. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies
INN::Config(3pm)					    InterNetNews Documentation						  INN::Config(3pm)

NAME
INN::Config - Export all the variables an INN Perl script might need DESCRIPTION
This Perl module sets up any and all the variables that an INN Perl script might need. More particularly, it allows to use inn.conf variables: they are all provided by innconfval, as well as the version of INN (in the variable $INN::Config::VERSION for its short number form, on in $INN::Config::version for its complete form). Other useful variables are also provided (directories, files, programs, masks, parameters). The complete list can be obtained with the following script that prints them out: use lib '<pathnews>/lib/perl'; use INN::Config; use Data::Dumper; my ($varname, $value); foreach my $var (@INN::Config::EXPORT_OK) { if ($var =~ /^$(.*)$/) { $varname = "INN::Config::$1"; $value = Dumper($$varname); $value =~ s/^$VAR1 = //; print "$$varname = $value"; } elsif ($var =~ /^@(.*)$/) { $varname = "INN::Config::$1"; $value = Dumper(@$varname); $value =~ s/^$VAR1 = //; print "@$varname = $value"; } } A local Perl script named innshellvars.pl.local in pathetc will be loaded, if present and executable, at the end of the run of this module. A typical use is to add or override variables. You only have to declare the module at the beginning of them: use lib '<pathnews>/lib/perl'; use INN::Config; Then, you can for instance use: print $INN::Config::localmaxartsize; to print the value of localmaxartsize as it is set in inn.conf. You can also specify a version when you import the module. If you write: use INN::Config 2.5.0; only versions of INN superior to 2.5.0 will be able to run the Perl script. It is also possible to import the variables directly in your namespace if you specify what you want to import: use INN::Config qw($localmaxartsize $pathbin); Note that a legacy innshellvars.pl is also provided in pathnews/lib for compatibility reasons with old Perl scripts not shipped with INN. It was used by versions of INN anterior to 2.5.0. The corresponding scripts for Shell and Tcl are, however, still in use: innshellvars and innshellvars.tcl. They offer the same capabilities as this module. HISTORY
innshellvars.pl was written by James Brister <brister@vix.com> for InterNetNews in 1996. It was converted to the INN::Config Perl module by Julien Elie in 2007. $Id: Config.pm.in 9311 2011-08-06 20:18:42Z iulius $ SEE ALSO
inn.conf(5), innconfval(1), perl(1). INN 2.5.3 2011-08-22 INN::Config(3pm)
All times are GMT -4. The time now is 09:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy