Search Results

Search: Posts Made By: nes
2,316
Posted By nes
Here I am getting output from test.sh file not...
Here I am getting output from test.sh file not from test.awk file
I wanted that array values from test.sh to test.awk file
2,316
Posted By nes
When I tried to print that values in test.sh...
When I tried to print that values in test.sh file, I am getting 2 values from array


set -A IDARR $ID
echo "${IDARR
}"
echo | awk -f test.awk -v TempArr="${IDARR
}"


Getting out put...
2,316
Posted By nes
Thanks Akshay, Whne I tried as below code,...
Thanks Akshay,

Whne I tried as below code, no is giving the 0 value and for that resion not getting any value from array. Please help me on this... :)
OUTPUT like :
0
After spliting

but...
2,316
Posted By nes
Not getting array in .awk file and print it
I have test.sh file as below :

set -A IDARR $ID
echo | awk -f test.awk -v TempArr="${IDARR
}"

I have test.awk file as below :


BEGIN {
Flag = 1;
}
{
print "Hello";
for(i in...
2,270
Posted By nes
Thanks SriniShoo and neutronscott for great...
Thanks SriniShoo and neutronscott for great suggestion :b: :)

I have changed following code and it is working fine.... Thanks a lot.... :D


/usr/xpg4/bin/awk -v a="${THREADIDARR }" 'BEGIN...
2,270
Posted By nes
Nested if not working with /usr/xpg4/bin/awk
Hi,
I am trying to do if inside the If in /usr/xpg4/bin/awk. But I am getting below error :

/usr/xpg4/bin/awk -v a="${THREADIDARR
}" 'BEGIN {FS="|"; n=split(a,b," "); for(i=1; i<=n; i++)...
8,016
Posted By nes
Hi Don Cragun, It is working.... Thank you...
Hi Don Cragun,

It is working.... Thank you very much.
8,016
Posted By nes
I just wanted no duplicate entry,So if we will do...
I just wanted no duplicate entry,So if we will do sort and then remove duplicate it will be easy.
Any seperator is fine.

Thanks for helping :)
8,016
Posted By nes
Hi Don Cragun, I have log file which is...
Hi Don Cragun,

I have log file which is mixed of all users, so perticular user log not getting from common log file. I have already captured lines based on userid. But thread I wanted to get in...
8,016
Posted By nes
I am getting duplicate entry in variable temp for...
I am getting duplicate entry in variable temp for example temp=2|2|3|4|4.
I was trying to get the temp=2|3|4. So I added sort -u at last, but not getting. it is right way to get using sort -u or any...
8,016
Posted By nes
Thanks a lot SriniShoo I tried to delete...
Thanks a lot SriniShoo

I tried to delete the duplicate entry and sorting using following code, but not getting. need help


temp=$(awk -F [\]\[] '{split($2, a, " : "); print a[2]}' ORS='|'...
1,921
Posted By nes
Compare the value in between square brackets in file
I wanted to compare the value inside the Squre bracket after Colon ( : ) based on any value(seperated by or operator | ) inside the variable Thread and if match found then wnated to store in output...
8,016
Posted By nes
1. I am trying to store this values in one...
1. I am trying to store this values in one variable like (temp = 84|589|60|5)
Because I have hundreds or thousands of lines and don't know how many enries are there. So I am planning to give...
8,016
Posted By nes
Grep number between Square [] brackets
I wanted to store the number inside the square bracket between colon( : ) and closing suqre bracket(]) in some variable.

Suppose I have lines like :

Input file :


20140320 00:08:23.846...
1,502
Posted By nes
Thanks jethrow, Could you please explain...
Thanks jethrow,

Could you please explain the code, as I am getting following error


awk: warning: escape sequence `\]' treated as plain `]'
1,502
Posted By nes
Grep username and get all the lines with thread numbers
I need help to extract the file. If I am entering the user name like abcd@xyz.com, search the username and get the tread number. Once will get thread number all the line having same threadnumber...
16,660
Posted By nes
When I tried the following code in SUNOS systeam...
When I tried the following code in SUNOS systeam for small file it is working fine, but if I am using same commnad for 1000 to 10000 lines of file. following code is not working in Sunos systeam.
...
16,660
Posted By nes
Hi MadeInGermany, Following script is...
Hi MadeInGermany,

Following script is displaying from Last occurance "Starting" to end of file, but not searching ERROR/WARNING within that block.

Please guide me how to get next two lines...
16,660
Posted By nes
Hi MadeInGermoney, nawk ' ...
Hi MadeInGermoney,


nawk ' /ERROR|WARNING/ {if (cnt==0) s=s (s?RS:s) b; cnt=3} cnt&&cnt-- {s=s RS $0} /Starting/ {s=""; cnt=0} {b=$0} END {print s}' errorlog


is not working in Linux...
Forum: Solaris 12-09-2013
2,163
Posted By nes
Thanks ZoZoo, There was problem with...
Thanks ZoZoo,

There was problem with environment, but now it is working fine.

your link is very useful ...... :)
16,660
Posted By nes
Thanks "Don Cragun", This code is giving...
Thanks "Don Cragun",

This code is giving following error :


syntax error at line : 5 `<<' unmatched
Forum: Solaris 12-06-2013
2,163
Posted By nes
Thanks Zozoo, But in SunOs it is not...
Thanks Zozoo,

But in SunOs it is not working. Please advice to attach the file in mail for Sunos system.
Forum: Solaris 12-05-2013
2,163
Posted By nes
Send file attachement in mail
Hello,

I am able to attache the file in UNIX/LINUX script using following code.


MAILFORMAT="Please do not replay this mail.This mail is auto generated."

echo -e $MAILFORMAT | mailx -r...
16,660
Posted By nes
Thanks for correction "Don Cragun", ...
Thanks for correction "Don Cragun",

Following code displays ERROR and WARNING from first 'Starting' occurance to second.

But I wanted from last to end of file in UNIX/LINUX also to solve this...
16,660
Posted By nes
I have given example of file, but not sure how...
I have given example of file, but not sure how many time "Starting" string is present in file.
I want only from last occurrence of string("Starting")to end of file where file has "ERROR" or...
Showing results 1 to 25 of 26

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