08-16-2011
hi itkamaraj
Please specify..
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Before I even attempt this, is it possible to grep for a pattern, maybe a partial sentence like "go to page 3", assign that to a variable and then use awk or something to pull out the 3 and assign it to a variable? So first I would have
Gotopg = "go to page 3"
then
page = 3 (9 Replies)
Discussion started by: k@ssidy
9 Replies
2. Shell Programming and Scripting
Hi,
I'm trying to assign the permissions, owner and group of a file to seperate variables, but using
ls -l filename | awk '{print $1 "\t" $3 "\t" $4}'
gives the owner as tom.ja instead of tom.james
Is there any way to expand it so i get the full name, or is there an easier way to get them... (5 Replies)
Discussion started by: olimiles
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am having a line which is separated by -
I need to extract each field and put into some variable.
a=`echo "this-is-the-case" | awk -F- '{print $1}' `
b=`echo "this-is-the-case" | awk -F- '{print $2}' `
c=`echo "this-is-the-case" | awk -F- '{print $3}' `
d=`echo "this-is-the-case" | awk... (2 Replies)
Discussion started by: posix
2 Replies
4. UNIX for Dummies Questions & Answers
Okay, I've made threads on extracting fields and comparing strings in separate files in .csv's. I've written the following code with intentions of learning more.
I just want this one question answered: How can I assign fields from a file(comma separated) to variables?
My goal is to check... (0 Replies)
Discussion started by: chickeneaterguy
0 Replies
5. Shell Programming and Scripting
I am looking to create a perl script which will take numbers from a simple text file, convert them from decimal to hex, and then rewrite those values in the file or create a new file with the hex numbers(whichever's easier).
My text document for example would be something as simple as
1312... (6 Replies)
Discussion started by: samh785
6 Replies
6. Shell Programming and Scripting
Hi! This might be a simple thing, but I'm struggling to assign values to variables from the file.
I've the following values stored in the file.. It consists of only two rows..
10
20
I want to assign the first row value to variable "n1" and the second row value to variable "n2"..
That is ... (3 Replies)
Discussion started by: abk07
3 Replies
7. Shell Programming and Scripting
I have a file that has four values on each line and I'd like to give each column a variable name and then use those values in each step of a loop. In bash, I believe you could use a while loop to do this or possibly a cat command, but I am super new to programming and I'm having trouble decoding... (2 Replies)
Discussion started by: ccorder22
2 Replies
8. Shell Programming and Scripting
i have variables RECIPIENTS_DEVL,RECIPIENTS_UACC,RECIPIENTS_PROD
i have a case statement to get the phase variable:
case ${WMD_UPHASE1} in
u) WMD_UPHASE4=UACC;;
i) WMD_UPHASE4=DEVL;;
p) WMD_UPHASE4=PROD;;
d) WMD_UPHASE4=DEVL;;
*) WMD_UPHASE4=DEVL;;
esac
I am unable to... (3 Replies)
Discussion started by: Arun Mishra
3 Replies
9. Shell Programming and Scripting
Hi,
Can the below be clarified please. i just want to know what is the difference between the two ways of assigning variables as mentioned below.
export SRC_TBL=${SRC_TBL-"MMA_COPAY_PLN_FACT_STG"}
export SRC_TBL="MMA_COPAY_PLN_FACT_STG"
thanks in advance :)
Arun (1 Reply)
Discussion started by: Arun Mishra
1 Replies
10. Shell Programming and Scripting
So first: Sorry if the title is confusing...
I have a script I'm writing with a file with several names in it (some other info - but it's not really pertinent...) - I want to be allow the user to delete certain records, but I ran into a problem I'm not sure how to go about fixing.
If I were... (6 Replies)
Discussion started by: sabster
6 Replies
LEARN ABOUT DEBIAN
mixin::extrafields::param
Mixin::ExtraFields::Param(3pm) User Contributed Perl Documentation Mixin::ExtraFields::Param(3pm)
NAME
Mixin::ExtraFields::Param - make your class provide a familiar "param" method
VERSION
version 0.011
$Id: /my/cs/projects/Mixin-ExtraFields-Param/trunk/lib/Mixin/ExtraFields/Param.pm 29059 2006-12-11T03:20:29.045283Z rjbs $
SYNOPSIS
package Widget::Parametric;
use Mixin::ExtraFields::Param -fields => { driver => 'HashGuts' };;
...
my $widget = Widget::Parametric->new({ flavor => 'vanilla' });
printf "%s: %s
", $_, $widget->param($_) for $widget->param;
DESCRIPTION
This module mixes in to your class to provide a "param" method like the ones provided by CGI, CGI::Application, and other classes. It uses
Mixin::ExtraFields, which means it can use any Mixin::ExtraFields driver to store your data.
By default, the methods provided are:
o param
o exists_param
o delete_param
These methods are imported by the "fields" group, which must be requested. If a "moniker" argument is supplied, the moniker is used
instead of "param". For more information, see Mixin::ExtraFields.
METHODS
param
my @params = $object->param; # get names of existing params
my $value = $object->param('name'); # get value of a param
my $value = $object->param(name => $value); # set a param's value
my @values = $object->param(n1 => $v1, n2 => $v2, ...); # set many values
This method sets or retrieves parameters.
AUTHOR
Ricardo SIGNES, "<rjbs@cpan.org>"
BUGS
Please report any bugs or feature requests to <http://rt.cpan.org>, for Mixin-ExtraFields-Param. I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.
COPYRIGHT
Copyright 2005-2006 Ricardo Signes, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.10.1 2006-12-11 Mixin::ExtraFields::Param(3pm)