9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi team,
# PERL
I have Dumper variable in perl and containing the below data and trying to fetch value and name from the reference variable.
$VAR1 = {
'retainSysIds' => 'true',
'variables' => ,
'name' => ,
... (4 Replies)
Discussion started by: giridhar276
4 Replies
2. Shell Programming and Scripting
Hi all,
I have written a perl code and stored the data into Data structure using Data::Dumper module.
But not sure how to retreive the data from the Data::Dumper.
Eg.
Based on the key value( Here CRYPTO-6-IKMP_MODE_FAILURE I should be able to access the internal hash elements(keys) ... (1 Reply)
Discussion started by: scriptscript
1 Replies
3. Shell Programming and Scripting
I have a file as below. It contains two data sets separated by >.
I want to pipe each data set to another program called psxy. How
can I get the different records
Have started doing as follows but it only passes the first data set
awk 'BEGIN {RS=">"};{print $0}' p.dat
cat p.dat... (12 Replies)
Discussion started by: kristinu
12 Replies
4. Shell Programming and Scripting
I need some help with this code below, i doesnt know why it will run twice with my function, but my function only got if else, any other way that can read line and put into array?
while read line; do
read -A array <<<$line
n=${#array}
for ((i=1;i<$n;i++)); do
print... (1 Reply)
Discussion started by: gavin_L
1 Replies
5. Shell Programming and Scripting
Hi,
i need a perl script which reads the file, content is given below. and output in new file.
TARGET DRIVE IO1 IO2 IO3 IO4 IO5
------------ --------- --------- --------- --------- ---------
0a.1.8 266 236 ... (3 Replies)
Discussion started by: asak
3 Replies
6. Shell Programming and Scripting
I am trying to read in a 2 column data file into Perl Hash array index. Here is my code.
#!/usr/bin/perl -w
use strict;
use warnings;
my $file = "file_a";
my @line = ();
my $index = 0;
my %ind_file = ();
open(FILE, $file) or die($!);
while(<FILE>) {
chomp($_);
if ($_ eq '')
{
... (1 Reply)
Discussion started by: subhap
1 Replies
7. Shell Programming and Scripting
Hi,
I have a sample data file that contains name-value pairs in it.
For example:
name1=value1
name2=value2
name3=value3
...
...
...
My concern is
1. How to get values of name1, name2, name3 using korn shell script?
2. I don't want to access each varible using $name1,$name2, $name3... (2 Replies)
Discussion started by: vinna
2 Replies
8. Shell Programming and Scripting
Hi All,
I am having trouble through, I am reading the input from tab delimited file containing several records,
e.g.
line1 field1 field2 field3 so on..
line2 field1 field2 field3 so on..
..
..
on the basis of certain fields for each record in input file, I have to retrieve... (1 Reply)
Discussion started by: Sonu4lov
1 Replies
9. Shell Programming and Scripting
Just want to learn how these are read into array but I don't seem to get it right what do I go wrong?
Below is the sample
Thanks
input
1 2 3 4
5 6 7 8
9 1 2 3
4 5 6 7
#!/usr/bin/perl
open (InFILE,"input");
while (<InFILE>) {
@ar = split ; (5 Replies)
Discussion started by: zap
5 Replies