Search Results

Search: Posts Made By: karan8810
1,626
Posted By karan8810
Do I need to use for loop then ?
Do I need to use for loop then ?
1,626
Posted By karan8810
Rename a multiple files
I have multiple files in folder which i want to rename. hence I am using the below command in my script by I get an error:

export XXX_LOG_DIR="${LOG_DIR}/${XXX_HOST}/xxx/${REPORT_DATE}"
mv...
1,384
Posted By karan8810
String Extraction
I am trying to extract a time from the below string in perl but not able to get the time properly




I just want to extract the time from the above line I am using the below syntax

x=~ /(.*)...
1,155
Posted By karan8810
This is for the perl programming tool
This is for the perl programming tool
1,155
Posted By karan8810
Extracting the part of string
I have a string:

2015-04-16 07:30:05,625000 +0900 xxxx.com

I just want to extract the time from the above line I am using the below syntax

x=~ /(.*) (\d+)\:(\d+)\:(\d+),(.*)\.com/
...
2,269
Posted By karan8810
Module load failing
I can use the "module load xyz" command interactively, but when run from a script, it says it can't find the "module" command. Is there any way of loading modules in a script?
3,977
Posted By karan8810
Hi RudiC, Thanks for the reply. yes I...
Hi RudiC,

Thanks for the reply.

yes I would want it in a for loop, as Would need to delete all the 1000 jobs from the database and Delete <jobname> is the command I would need to run.

Hope I...
3,977
Posted By karan8810
Read file and run a command
Hi

I have jobs (some 1000) defined in a file and I want to read those jobs and run a a command.

For example:
jobs.txt

abc
efg

I want to read the entire file and run the following...
2,779
Posted By karan8810
Hi Balaje, Can you please help here
Hi Balaje,

Can you please help here
2,779
Posted By karan8810
OK no problem.. thanks for trying.!! Balaje,...
OK no problem.. thanks for trying.!!

Balaje,

If you can please throw some light.

Thanks in advance
2,779
Posted By karan8810
Hi I did try: ...
Hi

I did try:

#!/ms/dist/perl5/bin/perl5.8
#!/usr/bin/perl

#@filename = 'abc.log';
@VS;


open FILE, "< abc.log";

while ( $line= <FILE>) {
#chomp ($line);
#foreach $line...
2,779
Posted By karan8810
Thanks balaje for the reply. the regex you...
Thanks balaje for the reply.

the regex you provided is working for "connected to" and not for "connected to/" Can you please help have a look
2,779
Posted By karan8810
Thanks Balaje for your kind help. Can you...
Thanks Balaje for your kind help.

Can you help me with the regex for following to extract PH11MD and PH11PP:

2015-01-23 07:45:00,009000 +0900...
2,779
Posted By karan8810
Thanks Balaje, It worked now.:) If i want to...
Thanks Balaje,

It worked now.:) If i want to enhance this script and add all the extracted id's into an array. I did like this. Is it fine?

#!/ms/dist/perl5/bin/perl5.8
#!/usr/bin/perl
...
2,779
Posted By karan8810
HI Balaje, I again ran but of no output was...
HI Balaje,

I again ran but of no output was generated. I shortened the code.

#!/ms/dist/perl5/bin/perl5.8
#!/usr/bin/perl

#@filename = 'abc.log';
#$VS;


open FILE, "< abc.log";
...
2,779
Posted By karan8810
Thanks balaje, But still the code is going...
Thanks balaje,

But still the code is going into else loop instead of if... Can u help!!
2,779
Posted By karan8810
Extract the word from the file and print it
I have a file which I am reading and then I need to extract a particualr word and if it matches the line.
2015-01-22 07:30:17,814000 +0900 [29133:main]/INFO:[configuration.manager/Cont'd_0031] - ...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 04:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy