03-16-2011
Quote:
Originally Posted by
aispg8
/edierror.sh[43]: test: 0403-004 Specify a parameter with this command.
The error may come from your actual code and not the code you included.
Please post the complete code (specifically around line 43)
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there a command where I can pipe my grep into it and it will output it with spaces rather than returns?
Example
I want to turn
prompt$ grep blah file
blah
blah
into this
prompt$ grep blah file | someCommand
blah blah (1 Reply)
Discussion started by: mrwatkin
1 Replies
2. Shell Programming and Scripting
Hi all!
I've faced with very unintelligible error using find/grep like this:
root@v29221:~# find /var/www/igor/data/www/lestnitsa.ru | grep u28507I get nothing as a result, but:
root@v29221:~# grep u28507 /var/www/igor/data/www/lestnitsa.ru/_var.inc
$db_name = 'u28507';... (2 Replies)
Discussion started by: ulrith
2 Replies
3. Shell Programming and Scripting
Hi
I have a small function which returns a wrong value.
The function tries to make a connection to oracle database and tries to get the open_mode of the database in the variable status.
However when a database is down the value of the status column is set to READWRITE i am not sure why.
I... (0 Replies)
Discussion started by: xiamin
0 Replies
4. Shell Programming and Scripting
my intension is to use a grep command inside the shell script
and if any row is returned or not..
depending on the resultset i have to code on further.
how to check this
i mean.. could anyone help me out with the if condition how to use it here !! (4 Replies)
Discussion started by: gotam
4 Replies
5. Shell Programming and Scripting
Hi all,
I am trying to grep a .txt file for a word. When I hit enter, it returns back to $
The file is 4155402 in size and is named in this way:
*_eveningtimes_done_log.txt
I use this command, being in the same directory as the file:
grep -i "invalid" *_eveningtimes_done_log.txt
... (16 Replies)
Discussion started by: DallasT
16 Replies
6. Shell Programming and Scripting
I’m trying to modify someone perl script to fix a bug. The piece of code checks that the zone name you want to add is unique. However, when the code runs, it finds a partial match using grep, and decides it already exists, so the “create” command exits.
$cstatus = `${ZADM} list -vic | grep... (3 Replies)
Discussion started by: TKD
3 Replies
7. Shell Programming and Scripting
I am trying to generate some scripts to help manage an Oracle database. When I check the value returned from Oracle it has a leading carriage return in the variable. Is there a way to prevent this? Is there a way to easily strip out the carriage return. See code and output below.
... (7 Replies)
Discussion started by: Panzer993
7 Replies
8. Shell Programming and Scripting
Hi all. I am trying to compare and filter two files. I have a bigfile.txt of names and ids and a smallfile.txt of ids only. What I am trying to do is use a while read loop to read the ids in the bigfile and then echo the name and id only if the id exists in the small file. Basically, I'm trying to... (5 Replies)
Discussion started by: jameswatson3
5 Replies
9. Shell Programming and Scripting
I need help to store the value returned from the function to one variable and then use that variable.
PREVIOUS_DATE_FUNCTION()
{
date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case "$DAY" in
0)
MONTH=`expr "$MONTH" - 1`
case... (1 Reply)
Discussion started by: aroragaurav.84
1 Replies
10. Shell Programming and Scripting
Hi,
I need to update rows in a table based on the values in an array variable.
code is :
while read line
do
error_msg="$(echo $line)"
index=`expr $index+1`
done <"logs/$ffile"
rows_count=${#error_msg
}
i=0
while
do
echo "error msgs is... (2 Replies)
Discussion started by: RP09
2 Replies
LEARN ABOUT DEBIAN
test::assertions::testscript
Test::Assertions::TestScript(3pm) User Contributed Perl Documentation Test::Assertions::TestScript(3pm)
NAME
Test::Assertions::TestScript - Base for test scripts
SYNOPSIS
use Test::Assertions::TestScript;
use Module::To::Test qw( frobnicate );
ASSERT(frobnicate(),"Frobnicate returns true");
DESCRIPTION
Test::Assertions::TestScript provides a base for writing test scripts. It performs some common actions such as setting up the @INC path and
parsing command-line options, specifically:
o The lib and t/lib directories are added to @INC.
o The current directory is changed to the directory the script is in.
o Test script command-line options are parsed. (See "COMMAND-LINE OPTIONS")
o The test set of functions from Test::Assertions are imported into your test script.
Test::Assertions::TestScript makes certain assumptions about the filesystem layout of your project:
o Modules that you are testing are in the lib directory of your project.
o Test scripts are in the t directory.
o There may also be a t/lib directory for any modules written for the test process.
Test::Assertions::TestScript should be "use"d before any modules that you intend to test.
OPTIONS
Options can be supplied to the import function. These should be placed after the "use" or "import". For example
use Test::Assertions::TestScript( tests => 10, options => { 'b', $opt_b })
The following options are defined:
tests
The number of tests to pass to "plan tests" from Test::Assertions. For example to tell Test::Assertions::TestScript that the script
contains 42 tests:
use Test::Assertions::TestScript tests => 42;
options
A hashref of additional options to capture via Getopt::Long. The "options" import parameter is passed verbatim to GetOptions, so
something along the following lines is required in order to capture the "-b" command line option:
use Test::Assertions::TestScript( options => { 'b' => $opt_b } );
COMMAND-LINE OPTIONS
A script based on Test::Assertions::TestScript will detect the following command line options.
-t Shallow tracing. Traces are "print"ed and AutoImport is turned on.
-T Deep tracing. Traces are "print"ed and AutoImport is turned on.
--trace-module=MODULE
Imports tracing into MODULE specifically. Can be specified multiple times.
-s Save generated output. You will need to write the actual code to do this in your testscript, but you can inspect
$Test::Assertions::TestScript::SAVE_OUTPUT to see whether this argument was given.
Be aware that all other command line options will be disregarded unless the "options" import parameter is used to capture them.
VERSION
$Revision: 1.18 $
AUTHOR
Colin Robertson <cpan _at_ bbc _dot_ co _dot_ uk>
COPYRIGHT
(c) BBC 2005-6. This program is free software; you can redistribute it and/or modify it under the GNU GPL.
See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt
perl v5.10.0 2006-08-10 Test::Assertions::TestScript(3pm)