Search Results

Search: Posts Made By: ambarginni
1,108
Posted By ambarginni
-gt [greater than] comparitive operator across the paltform
Hi I am using -gt comparative operator in one of my shell script.

I have tested that in Linux platform but same code will go in many other platforms i.e.
HPI
HPUX
Solaris
zLinux
...
1,206
Posted By ambarginni
Thanks Zaxxon for the response. Yes, we can...
Thanks Zaxxon for the response.

Yes, we can trap the error and show the message to the user based on the return code.

But I wanted the message which can tell user why it is failed and only...
1,206
Posted By ambarginni
Trapping the error during copy
I have a requirement:

During copy command for example:
cp -rf <sourceDir> <destinationDir>

this command may fails for many reasons like:
1. source or destination directory does not exist
2....
9,538
Posted By ambarginni
To handle the case during copy when: No space left on device
print "After create SubDir routine.";
createSubDirs($fileDir);
my $from = $ORACLE_HOME.$dirSep.$file;
my $to =...
1,945
Posted By ambarginni
To handle the case during copy when: No space left on device
print "After create SubDir routine.";
createSubDirs($fileDir);
my $from = $ORACLE_HOME.$dirSep.$file;
my $to =...
11,997
Posted By ambarginni
Thank you Bakunin.
I have appended the keywords as you suggested.

Further I wanted to understand the code better.. can you please help me..
in the below code what does that mean....


@fails = grep...
11,997
Posted By ambarginni
Using forward slash in search pattern in perl script
I have existing pattern in the perl script as:

my $pattern = "^Line.*?:|^Errors*: [^0]|^SEVERE:.*?:|^Null pointer exception occurred";
and I wanted to include below keywords in my search pattern...
5,220
Posted By ambarginni
Thank you. Problem is solved now. :b:
Thank you. Problem is solved now. :b:
5,220
Posted By ambarginni
Unable to zip the files
I am getting below error:

zip error: Nothing to do! (try: zip -rq <zip_name> . -i <file_list>)

if ( ! $_2_zip_dirs eq "" ) {

$OS->print ("$zip -rq $zip2 $_2_zip_dirs\n");
...
6,791
Posted By ambarginni
Thanks to All
What I concluded that all the Linux shell (i.e. sh,bash,ksh) different versions may not support 'typeset' command and may also not considered as standard.

I changed my code:
<<-- BELOW LINE...
6,791
Posted By ambarginni
typeset
I am using ksh only

#!/bin/ksh
6,791
Posted By ambarginni
Typeset in HP-UX and Linux
typeset -u xname1=$mname1 is working fine in HP-UX.

But it throwing below error in Linux:
line 40: typeset: -u: invalid option
typeset: usage: typeset [-afFirtx] [-p] name[=value] .

Please...
3,152
Posted By ambarginni
Please share if any one have even a small clue!
Please share if any one have even a small clue!
3,152
Posted By ambarginni
HPUX_SCHED_NOAGE 178
We are getting the error below in Linux - Oracle 11g Bench as below:

Last System configure:

NOTE: Fri May 18 17:34:32 IST 2012: creating SPFILE ...
CREATE...
2,470
Posted By ambarginni
See if your requirement is print or store the...
See if your requirement is print or store the unique value of 2nd Column (I assume delimiter is space) the below is your solution:

awk '!A[$2]++{print $0}' abc.txt > def.txt
4,888
Posted By ambarginni
Thank you sooo much Scrutinizer. It has...
Thank you sooo much Scrutinizer.

It has worked perfectly the way I wanted... kudos to you.

Can you please explain me the above command, I am bit new to awk.

Thanks Again, Ambar
4,888
Posted By ambarginni
Thanks Scrutinizer, I believe you have seen...
Thanks Scrutinizer,

I believe you have seen the complete thread conversation to post the above solution, But after itkamaraj suggestion I have changed the way... I am generating only one file now...
4,888
Posted By ambarginni
Thanks to all readers and specially to...
Thanks to all readers and specially to itkamaraj...

But I stucked with the below requirement please help me... I wanted the output as:
* I do NOT wanted to sort the command/fourth field...
4,888
Posted By ambarginni
Kudos to you itkamaraj!! YOU ARE GOD OF...
Kudos to you itkamaraj!!

YOU ARE GOD OF UNIX!!
4,888
Posted By ambarginni
Thank you sooo much.. itkamaraj. It worked...
Thank you sooo much.. itkamaraj.

It worked for me... but can you please explain me
awk -F\| '!/#/{print $4}' SNA_DB_UPG.list | sort -unawk doesn't seems to be working for my shell...
4,888
Posted By ambarginni
Thanks itkamaraj, I have to do small change...
Thanks itkamaraj,

I have to do small change in the code (tiny project)

There is a file name SNA_DB_UPG.list which has a format:

#
#MNT4 ##R9.1.1.4
#R950 ##R9.5.0
#R9501 ##R9.5.0.1...
4,888
Posted By ambarginni
The output is as below: (running on command...
The output is as below: (running on command prompt)


sys,root # BEGIN { print SNA_DB_UPG.list "|" }
sh: BEGIN: not found.
sys,root # { print $8, "\t", $3}
> END { print " - DONE -" }
>
4,888
Posted By ambarginni
After removing quotes .. the below code doesn't...
After removing quotes .. the below code doesn't worked for me....

BEGIN { print SNA_DB_UPG.list "|" }
{ print $8, "\t", $3}
END { print " - DONE -" }
4,888
Posted By ambarginni
When I executed the below code in command prompt...
When I executed the below code in command prompt again the same problem.... Seeking for a delimiter and not taking the below as a executable code

BEGIN { print "SNA_DB_UPG.list"," }
{ print $8,...
4,888
Posted By ambarginni
Thanks itkamaraj
Now it worked!! Thank you very much...

But can you please elaborate me with the logic as well.. As i am trying to understand the 'AWK'... what is all about - I know it is huge topic but the basic...
Showing results 1 to 25 of 44

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