I'm not very familiar with the ssh command. When I tried to set a variable and then echo its value on a remote machine via ssh, I found a problem. For example,
$ ITSME=itsme
$ ssh xxx.xxxx.xxx.xxx "ITSME=itsyou; echo $ITSME"
itsme
$ ssh xxx.xxxx.xxx.xxx 'ITSME=itsyou; echo $ITSME'
itsyou
$... (3 Replies)
I have a line in multiple scripts:select into table /dir1/dir2/file.dat
dir1 and dir2 are the same but file.dat is different from script to script.
I need to include /dir1/dir2/file.dat into double quotes in each file of my directory:select into table "/dir1/dir2/file.dat" (13 Replies)
Hi All,
I have multiple lines in a file like:-
"abc" def "ghi" jkl "mno" 1
I want to print in output:-
abc/ghi/mno 1
How can I do this in perl?
Regrds,
Nilabh
-----Post Update-----
Additional info:-
The last field of the file should be output as it is.In the above example 1 is... (6 Replies)
Hi guys, I have a sed line in double quotes which works fine, but I want it to be in single quotes
here is the sed line
sed "/abc_def/s/\'.*\'/\'\${abc_def}\'/"
can some one give the equivalent to the above script in single quotes
Thanks a ton (5 Replies)
Unix superusers,
I am new to unix but would like to learn more about grep. I am very familiar with regular expressions as i have used them for searching text files in windows based text editors. Since I am not very familiar with Unix, I dont understand when one should use GREP with the... (2 Replies)
My input is like this:
this is a test line.
I want my output to be like this:
"this", "is", "a", "test", "line"
Any idea how this can be done in Linux? (3 Replies)
Hi,
Trying to change the prompt. I have the following code.
export PS1='
<${USER}@`hostname -s`>$ '
The hostname is not displayed
<abc@`hostname -s`>$ uname -a
AIX xyz 1 6 00F736154C00
<adcwl4h@`hostname -s`>$
If I use double quotes, then the hostname is printed properly but... (3 Replies)
Hi All,
OS - Suse 10
ksh --version
version sh (AT&T Research) 93s+ 2008-01-31
I am passing two words within double quotes ("Application Developer") to script as variable, but script is adding two single quotes between two words like ("Application' 'Developer").
below is simple test... (4 Replies)
Hi All,
I'm unable to load the data using sql loader where there are double quotes within the double quotes As these are optionally enclosed by double quotes.
Sample Data :
"221100",138.00,"D","0019/1477","44012075","49938","49938/15043000","Television - 22" Refurbished - Airwave","Supply... (6 Replies)
Hi,
00000119EEEC3F25 feedoor 20171103
0000011A4F152077 feedard 20171024
00000191FA295F61 feedzipperhola 20171023
00000213C57BB856 feedriodapple 20171005
0000025F778EF9D5 joobakoolrk 20171004
I needed the result as:
"00000119EEEC3F25", "feedoor", ... (9 Replies)
Discussion started by: ashokvpp
9 Replies
LEARN ABOUT DEBIAN
html::formfu::model::hashref
HTML::FormFu::Model::HashRef(3pm) User Contributed Perl Documentation HTML::FormFu::Model::HashRef(3pm)NAME
HTML::FormFu::Model::HashRef - handle hashrefs
SYNOPSIS ---
elements:
- user_id
- user_name
- type: Repeatable
nested_name: addresses
elements:
- type: Hidden
name: id
- street
$form->model('HashRef')->default_values( {
user_id => 123,
user_name => 'Hans',
addresses => [
{ id => 2,
street => 'Somewhere' },
{ id => 3,
street => 'Somewhere Else' }
]
} );
$form->default_model('HashRef');
my $hashref = $form->model->create();
# $hashref is very much the same as the hashref you passed to default_values()
DESCRIPTION
If you need the content of a formular as hashref or for processing with other modules like "JSON" you can use this model.
METHODS
create
This method creates a hashref from a filled form. This form can be filled by calling "default_values" in HTML::FormFu, default_values of
any other model class (e. g. HTML::FormFu::Model::DBIC) or by simply submitting the form.
If "deflators" is true all deflators are processed (defaults to 1).
If "options" is true the value of all elements which have options like HTML::FormFu::Element::Select will be transformed.
---
elements:
- type: Select
name: select
options:
- [1, "Foo"]
- [2, "Bar"]
If the value of "select" is 1, create will create this hashref:
{ 'select' => { label => 'Foo', value => 1 } }
If there is more than one value selected, an arrayref is created instead:
{ 'select' => [ { label => 'Foo', value => 1 },
{ label => 'Bar', value => 2 } ] }
If "options" is false, the output will look like this:
{ 'select' => 1 }
respectively
{ 'select' => [1, 2] }
"options" is false by default.
To get a flattened hash, you can set "/flatten" to a true value (defaults to 0). This will generate a hash which uses the nested name of
each field as key and the value of this field as hash value. If there is a field which has more than one value, a counter is added. The
above example would result in a hash like this using "/flatten":
{ 'select_0' => 1,
'select_1' => 2 }
update
Alias for "create".
default_values
Populate a form using a hashref. This hashref has the same format as the output of "create". If "inflators" is true, all inflators will be
processed (defaults to 1).
CONFIGURATION
These methods do not return the model object so chaining is not possible!
options
Adds the label of a value to the hashref if the element has "options" in HTML::FormFu::Element::_Group. See "create" for an example.
Defaults to 0.
flatten
Flattens the hash using Hash::Flatten. See "create" for an example. Defaults to 0.
deflators
If true, processes deflators in "/create". Defaults to 1.
inflators
If true, processes inflators in "/default_values". Defaults to 1.
SEE ALSO
HTML::FormFu, Hash::Flatten
AUTHOR
Moritz Onken, "onken@houseofdesign.de"
perl v5.14.2 2012-01-23 HTML::FormFu::Model::HashRef(3pm)