I have a piece of code that I do not want to continuously repeat. I want to call script2 from script1 and pass a parameter. Here is an example:
Script1:
.......
nohup ./Script2 PARAMETER
.......
Script2:
if
# Checks if any params.
then
echo "No parameters passed to function."
... (4 Replies)
Hi, I am trying to write a ftp script which will read a file for filenames and ftp those files to another server. Here's my ftp script, but it's scanning the current directory for file names.
My question is how can I pass multiple files (these files will have the name of data files that need to... (0 Replies)
I would like to write a scirpt a.sh that it first checks the first parameter of the input. If it fulfill some condition ,then run an executable program b by using all the parameter.
ie.
> ./a.sh 10 20 30 40 50
Then a.sh first checks the first parameter, 10, if it mathes the requirement, then... (2 Replies)
Hi,
i am new to awk. I am using csv2pipe script(shown below)
BEGIN { FS=SUBSEP; OFS="|" }
{
result = setcsv($0, ",")
print
}
# setcsv(str, sep) - parse CSV (MS specification) input
# str, the string to be parsed. (Most likely $0.)
# sep, the separator between the values.
#
#... (6 Replies)
Hi friends.
i am newbie to shell scripting. I need to create a script where i will be passing 2 parameters to the script and based on that it should work.
For ex: start_proc a 2 or start_proc b 2
start_proc a 2 --- this should bring up 2 processes as i define inside the script.
start_proc... (2 Replies)
Hi Guys,
I have a file in the format Parmater=value. I want to read the value and pass it to corresponding Variable.
The Parameter file is as follows
Number=23
Text1=mango
Text2=yup
'Number' value needs to be read and passed to ID variable. Also, 'Text1' value needs to be passed to... (9 Replies)
Dear all
Does anybody know how to pass the password as input parameter to scp or rsync in unix scripts?
I have tried echo <password> | scp filename username@<ip address>:/filepath/ .
But it does not work.
BTW, I dont want to setup ssh trust between servers in this adhoc task.
Regards,... (2 Replies)
Hi,
I have an XML file like the following...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar"... (2 Replies)
Hi,
I have an XML file like the following...
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ONDEMAND_JOB VERSION="5.1" LOCALE="en_US">
<IMPORT_JOBSET TC_CONNECTION_NAME="default" ENVIRONMENT="PRD" USERNAME="Administrator" PASSWORD="AdminPassword" CALENDAR="Main Monthly Calendar"... (3 Replies)
//file begin =====
//some code
task abcd_;
input x;
input y,z; //some comment
output w; //some comment
reg p;
integer q;
begin
//some code
end
endtask : abcd_
//some code
//file end =====
expected output from above... (1 Reply)
Discussion started by: rishifrnds
1 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)