07-07-2010
Thanks.
That single line of perl looks more elegant than what I had: I'll try that tonight.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have created a script "myscript.sh"
I need to run this script with diffrent parameters.
The parameters are stored in a file myparam.txt.
I need to run myscript.sh script for every parameter supplied in myparam.txt.
Example:
If myparam.txt contains following lines:
param1
param2
param3... (3 Replies)
Discussion started by: chawlaaman
3 Replies
2. Shell Programming and Scripting
hi,
i am passing around 14 parameters for a script
a=$1
b=$2
c=$3
d=$4
e=$5
f=$6
g=$7
h=$8
i=\"${9}\"
shift
j=\"${1}\"
still for j it is displaying the 1st parameter value..how to make it take the 10th parameter (2 Replies)
Discussion started by: dnat
2 Replies
3. Shell Programming and Scripting
Hi,
The below script is working fine
awk1.sh
=======
awk BEGIN { FS="|" } FNR==NR { f1=$2; next } $1 in f1 && $2 =="xx" && $1 == "DAILY_JOB" {print $3}
awk -f awk1.sh a.txt b.txt--Its working fine .
When passing parameters its not working .Any help it should be appereciated.
... (4 Replies)
Discussion started by: akil
4 Replies
4. Shell Programming and Scripting
I am writing a script that should read the csv file and pass the values in the file as parameters
to the script. The csv file looks like this:
TEST_1,20110221
TEST_2,20110220
TEST_3,20110218,20110219
Currently this is how i am running the script
./test.sh <param1> <date>
Ex: ./test.sh... (6 Replies)
Discussion started by: stunnerz_84
6 Replies
5. Shell Programming and Scripting
Hi All,
I am new to shell scripting required some help in passing the parameter value to the shell script.
I am writing a shell script, in the script I have created two functions as below.
first function
get_trend_ids () {
Here I am connecting to the database and getting all the... (3 Replies)
Discussion started by: shruthidwh
3 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I have written a shell script and the script is working fine, I am passing my MIT_ID(NUMBER VALUE) to the shell script from the command prompt and my script is executing as expected.
Now I have to pass all the MIT_ID's from a .txt file to the shell script,as I am automating this I... (6 Replies)
Discussion started by: gaur.deepti
6 Replies
7. Shell Programming and Scripting
how can i make a script to run only when parameters are given,
if parameters are not given it should through an error , saying "please enter a parameter"
for ex: i want a find command to run only when the parameters are given (4 Replies)
Discussion started by: knip
4 Replies
8. Shell Programming and Scripting
we are using following script to execute stored procedue. The problem is run_pmcmd.ksh script is using $*
parameter which is not taking in account 'Men Shirt' parameter which includes spaces.
1. Step 1
run_pmcmd.ksh CONVERT_TEST
script for run_pmcmd.ksh
/u01/$(whoami)/run_pmcmd.ksh... (11 Replies)
Discussion started by: sandy162
11 Replies
9. Shell Programming and Scripting
I have a script that uses more than one parameter. It looks like this:
for i in `cat /tmp/listofpolicies`;
do
for x in $(cat /tmp/lst |sed 's/^/\/usr\/openv\/netbackup\/db\/class\//g');
do /usr/openv/netbackup/bin/admincmd/bpplinclude $i -delete -f $x;done;done
The problem is that the... (3 Replies)
Discussion started by: newbie2010
3 Replies
10. Shell Programming and Scripting
Hello Experts,
I have a requirement to pass some parameters to Linux cron tab.
For ex: My default cron entry looks like this as below:
-------------------------------
55 10 * * --... (7 Replies)
Discussion started by: MaheshChaudhari
7 Replies
LEARN ABOUT DEBIAN
class::makemethods::template::classinherit
MakeMethods::Template::ClassInherit(3pm) User Contributed Perl Documentation MakeMethods::Template::ClassInherit(3pm)
NAME
Class::MakeMethods::Template::ClassInherit - Overridable class data
SYNOPSIS
package MyClass;
use Class::MakeMethods( 'Template::ClassInherit:scalar' => 'foo' );
# We now have an accessor method for an "inheritable" scalar value
package main;
MyClass->foo( 'Foozle' ); # Set a class-wide value
print MyClass->foo(); # Retrieve class-wide value
...
package MySubClass;
@ISA = 'MyClass';
print MySubClass->foo(); # Intially same as superclass,
MySubClass->foo('Foobar'); # but overridable per subclass/
DESCRIPTION
The MakeMethods subclass provides accessor methods that search an inheritance tree to find a value. This allows you to set a shared or
default value for a given class, and optionally override it in a subclass.
Standard Methods
The following methods from Generic should all be supported:
scalar
string
string_index (?)
number
boolean
bits (?)
array (*)
hash (*)
tiedhash (?)
hash_of_arrays (?)
object (?)
instance (?)
array_of_objects (?)
code (?)
code_or_scalar (?)
See Class::MakeMethods::Template::Generic for the interfaces and behaviors of these method types.
The items marked with a * above are specifically defined in this package, whereas the others are formed automatically by the interaction of
this package's generic settings with the code templates provided by the Generic superclass.
The items marked with a ? above have not been tested sufficiently; please inform the author if they do not function as you would expect.
SEE ALSO
See Class::MakeMethods for general information about this distribution.
See Class::MakeMethods::Template for more about this family of subclasses.
See Class::MakeMethods::Template::Generic for information about the various accessor interfaces subclassed herein.
If you just need scalar accessors, see Class::Data::Inheritable for a very elegant and efficient implementation.
perl v5.10.1 2004-09-06 MakeMethods::Template::ClassInherit(3pm)