Dear all
That's another problem from me, i wanna do a lot of if statement checking for correct input by user, will be prompt input again if the input not meet the requirement defined by If or while statement...
like this one ....
while
I know it's less effiency write the program... (14 Replies)
Hi all,
I have one clarification i am using the loop which will process for each record .suppose there is f ailure in the first record it need to send mail and process the next .my code:
defcount=`cat <filename>|wc -l`
while ]
do
if <some condiotion>
then
echo "mail"
fi
done
so... (1 Reply)
Hi all ,
Recently i came across this in FAQ's.
I have a file
cat rem.txt
sreedhar 20
sreedhar 10
sreedhar 15
sreedhar 18
sreedhar 16
sreedhar 30
I have to replace sreedhar with "Sridhar" if the second parameter is > 18.
I need to do it in "sed" only. I am wondering how this... (4 Replies)
Hi.. Gurus
I Have a list of .zip files in a directory. I want to check whether each .zip file having some particular file or not (say .jsp) if it's having .Jsp file then create a directory as per the .zip file and extract the content to that directory except the .jsp file, If .zip not having... (3 Replies)
testfile.csv
0","1125209",,"689202CBx18888",,"49",,,"NONMC",,,,,"01112010",,,,,,,"MTM-
"1","",,"689202ABx19005",,"49",,,"NONMC",,,,,"01072010",,,,,,,"MTM-
testfile.csv looks like above format
if the second column is null then get 23rd column and store in a different varible .. add all the... (1 Reply)
Problem :
I want to create a separate file for country list if condition is true. Please help.
*****************************************************
Input file:
SV-INCR-139302-365540488-201104090934.sqllog
SV-INCR-1082-552793184-201104040805.sqllog
SV-INCR-1077-855045741-201104040805.sqllog... (4 Replies)
Hi All,
I am trying to check if two variables have value assigned to it.
i am doing it like
if ]
then
echo "Please specify either single hostname or host file for the report"
usage
exit
fi
But its not working for it.Even i specify values for both variables it dont go... (6 Replies)
Hi am trying to write a script which find the existence of a file from a find command output and perform a task if the file exists. Help me out with the correct syntax . Am trying with the following one but unable to get the output.
if
then <some tasks>
else
echo "file not exists"
fi (5 Replies)
i have a script where i have to find the age of a file,
if
then
echo "dnb file is present for the monthly load" >> $RUNLOG
dnb="1"
else
echo "dnb file has not arrived yet" > $ERRLOG
dnb="0"
fi
i know the file is available so... (3 Replies)
i have this code
for i in `cat sql_output.txt`
do
-- some script commands
done
sql_output.txt has 1 column with employee_ids
If the sql_output.txt is null then the do loop should not execute.
How can i implement this.
for i in `cat sql_output.txt`
If i is null or empty
then ... (5 Replies)
Discussion started by: rafa_fed2
5 Replies
LEARN ABOUT DEBIAN
prophet::test
Prophet::Test(3pm) User Contributed Perl Documentation Prophet::Test(3pm)
set_editor($code)
Sets the subroutine that Prophet should use instead of "Prophet::CLI::Command::edit_text" (as this routine invokes an interactive editor)
to $code.
set_editor_script SCRIPT
Sets the editor that Proc::InvokeEditor uses.
This should be a non-interactive script found in t/scripts.
import_extra($class, $args)
in_gladiator($code)
Run the given code using Devel::Gladiator.
repo_path_for($username)
Returns a path on disk for where $username's replica is stored.
repo_uri_for($username)
Returns a file:// URI for $USERNAME'S replica (with the correct replica type prefix).
replica_uuid
Returns the UUID of the test replica.
database_uuid
Returns the UUID of the test database.
replica_last_rev
Returns the sequence number of the last change in the test replica.
as_user($username, $coderef)
Run this code block as $username. This routine sets up the %ENV hash so that when we go looking for a repository, we get the user's repo.
replica_uuid_for($username)
Returns the UUID of the given user's test replica.
database_uuid_for($username)
Returns the UUID of the given user's test database.
ok_added_revisions( { CODE }, $numbers_of_new_revisions, $msg)
Checks that the given code block adds the given number of changes to the test replica. $msg is optional and will be printed with the test
if given.
serialize_conflict($conflict_obj)
Returns a simple, serialized version of a Prophet::Conflict object suitable for comparison in tests.
The serialized version is a hash reference containing the following keys:
meta => { original_source_uuid => 'source_replica_uuid' }
records => { 'record_uuid' =>
{ change_type => 'type',
props => { propchange_name => { source_old => 'old_val',
source_new => 'new_val',
target_old => 'target_val',
}
}
},
'another_record_uuid' =>
{ change_type => 'type',
props => { propchange_name => { source_old => 'old_val',
source_new => 'new_val',
target_old => 'target_val',
}
}
},
}
serialize_changeset($changeset_obj)
Returns a simple, serialized version of a Prophet::ChangeSet object suitable for comparison in tests (a hash).
run_command($command, @args)
Run the given command with (optionally) the given args using a new Prophet::CLI object. Returns the standard output of that command in
scalar form or, in array context, the STDOUT in scalar form *and* the STDERR in scalar form.
Examples:
run_command('create', '--type=Foo');
load_record($type, $uuid)
Loads and returns a record object for the record with the given type and uuid.
as_alice CODE, as_bob CODE, as_charlie CODE, as_david CODE
Runs CODE as alice, bob, charlie or david.
perl v5.10.1 2009-09-02 Prophet::Test(3pm)