I am trying to use the split commad to seperate string reading from file. but it dosent give me a correct result. can some body tell me what is the wrong in following scritp.
Hi,
I have to split a line of the form
1232423#asdf#124324#54534#dcfg#wert#rrftt#4567
into an array in perl. I am using
@fields;
@fields=split('#',$line);
if($fields eq "1")
But this is not working. By using the syntax, the statements in "if" are never executed. Please help.... (9 Replies)
how can I find cpu usage memory usage swap usage and
I want to know CPU usage above X% and contiue Y times and memory usage above X % and contiue Y times
my final destination is monitor process
logical volume usage above X % and number of Logical voluage above
can I not to... (3 Replies)
Hi all,
Can you please tell me the command, with which one can know the amount of space a specific directory has used.
df -k . ---> Displays, the amount of space allocated, and used for a directory.
du -k <dir name> - gives me the memory used of all the files inside <dir>
But i... (2 Replies)
i have two files as shown below
t1.txt:
argument1
argu2
argu37
t2.txt:
22
33
44
i want o/p as
argument1 22
argu2 33
argu37 44
i am trying to merge two file under perl script using following
system("paste t1.txt t2.txt | awk... (3 Replies)
Hi,
I have an array with following data. First field shows the owner and second is unique name. Now i have to pic the latest value with respect to the date in case of duplicate.
like "def" is from two owners "rahul/vineet", now i want the latest from the two and the owner name also for all the... (9 Replies)
Hi I have some doubts with below perl script sub program .
In the below code what are below lines do ?
1. ($user, $server, $os, $version, $ref_path, $ref_line, $ref_ftp) = @_;
2. if ( -e "/usr/kerberos/bin/krsh" )
3. $$ref_path = "/usr/kerberos/bin" unless ($$ref_path);why we are... (1 Reply)
Hi,
I have a shell script, In which i have variable "var1" and some perl command inside shell script.
export var1='coep -n rst-a2p-hinje.vci.all.com -c'
perl -pi -e 's/^/coep -n rst-a2p-hinje.vci.all.com -c /' command.txt
currently I am adding value of var1 in command.txt file by... (2 Replies)
I'm not sure why I'm having so much trouble with this.
I think I'm really not understanding how this works.
I'm trying to store a regex in a variable for use later in a script.
Can someone tell me why this doesn't match???
#!/usr/bin/perl
#
#
#
$ticket=1212;
my $rx_ticket =... (1 Reply)