Search Results

Search: Posts Made By: MKNENI
5,311
Posted By MKNENI
Thank to you all. I tried the perl solution that...
Thank to you all. I tried the perl solution that worked great. Not tried awk and sed solution.
5,311
Posted By MKNENI
Combining 2 lines in a file into 1 line
Hi all,

I have a file with lot of lines with repeating pattern. ( TABLE_NAME line followed by Total line).
I would like combine these two lines into one line seperated by cama and create a new...
2,954
Posted By MKNENI
wow. Thank you both so much. awk...
wow. Thank you both so much.

awk '/^call.*Failed/{print $1}' RS= FS='\n' infile worked good.

:)
2,954
Posted By MKNENI
File Reading for a certain string and echo the line before
Hi Guys,

I have a big file like this. It has cache group line ( the bold lines ) and then followed by 10 status lines showing either Compelte or Failed. This pattern repeats several time. We can...
Forum: Solaris 02-27-2012
12,986
Posted By MKNENI
Thank you all. You are the best. #!/bin/ksh...
Thank you all. You are the best.

#!/bin/ksh woked great. This saved lot of trouble for me.

;););)
Forum: Solaris 02-22-2012
12,986
Posted By MKNENI
crontab job issues with export command
Hi all,

I have sevaral jbos with bunch of export commands like export VARIABLE=value.
They work perfectly when I run manually but when I try to run from crontab it stops right at this export...
1,448
Posted By MKNENI
Thank you. I had to use the escape character...
Thank you. I had to use the escape character before the $. stupid me. I was focusing on the "."

@databases = `crs_stat | grep .db | awk -F. '{print \$2}'`;
1,448
Posted By MKNENI
Perl error. Help please
At this line in the perl script,
@databases = `crs_stat | grep .db | awk -F. '{print $2}'`;

It is throwing this error.
Use of uninitialized value in concatenation (.) or string at ........
...
35,832
Posted By MKNENI
Thanks you guys. Looks like its lot of pain using...
Thanks you guys. Looks like its lot of pain using perl to set evn varialble.

I switched to shell script. That is working good.

Thanks again to everybody.

:b::b:
35,832
Posted By MKNENI
echo $ORACLE_SID and $ORACLE_HOME is showing...
echo $ORACLE_SID and $ORACLE_HOME is showing blanks.

I can't set this in the .profile because I keep executing the script by passing a parameter and this perl script should set the env variables...
35,832
Posted By MKNENI
No luck. I tried with ./ and specifying full...
No luck. I tried with ./ and specifying full path. Getting the same error message.

I need to do a lot of string manipulation before setting these 2 environment variables. I feel more comfortable...
35,832
Posted By MKNENI
perl. How to set persistent environment variables
I have test.pl scrit with these few lines.

#!/usr/bin/perl
$ENV{'ORACLE_SID'} = "D3771";
$ENV{'ORACLE_HOME'} = "/oracle/product/10.2.0/db_1";

When I try . test.pl it throws an error. When I...
24,449
Posted By MKNENI
Thank you both. I am still lost. I am not talking...
Thank you both. I am still lost. I am not talking about the mtime of the file. I need to extract date portion from the file name (which is in YYYYMMDD format) and compare it with the current date.
24,449
Posted By MKNENI
Perl: Extracting date from file name and comparing with current date
I need to extract the date part from the file name (20080221 in this ex) and compare it with the current date and delete it, if it is a past date.

$file = exp_ABCD4_T-2584780_upto_20080221.dmp.Z
...
7,153
Posted By MKNENI
:b: cool. It is working now. @files...
:b:

cool. It is working now.

@files =`find $path \\( -name "*.dmp" -o -name "*.dmp.Z" \\) -mtime +30`;

Thanks a lot era.
7,153
Posted By MKNENI
Thanks era, You mean like this. @files...
Thanks era,

You mean like this.
@files =`find $path \\(-name "*.dmp" -o -name "*.dmp.Z"\\) -mtime +30`;

This is not working either.
7,153
Posted By MKNENI
Perl Script Error with find command
Guys,

I need to find all the files ending with either dmp or dmp.Z. This command is giving me error.

@files =`find $path \(-name "*.dmp" -o -name "*.dmp.Z"\) -mtime +30`;

sh: 0403-057...
Showing results 1 to 17 of 17

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