Search Results

Search: Posts Made By: ananan
3,805
Posted By ananan
awk pattern match by looping through search patterns
Hi
I am using Solaris 5.10 & ksh

Wanted to loop through a pattern file by reading it and passing it to the awk to match that value present in column 1 of rawdata.txt , if so print column 1 & 2...
1,600
Posted By ananan
Thank you. It's working fine. If you don't mind...
Thank you. It's working fine. If you don't mind how can I achieve if I need to read another pattern file 2 and form a variable p3 as like p2 and do a match with f3 in the same script.
1,600
Posted By ananan
Rightly catched my requirements.. The and...
Rightly catched my requirements..
The and condition variable p2 will be constant. I need to build the or conditions variable p1 alone.
Say pattern file contains

1234567890
2345678901...
1,600
Posted By ananan
Performance assessment of using single or combined pattern matching
Hi,

I want to know which pattern matching technique will be giving better performance and quick result.

I will be having the patterns in a file and want to read that patterns and search through...
1,955
Posted By ananan
Parallel increment of nested for loop
Hi,

I am using solaris 5.10 environment and need help on doing parallel increment of nested for loop.

Samples

#inside the code the values assigned to a variable by another awk command will...
1,482
Posted By ananan
Finally found the issues. I was initializing the...
Finally found the issues. I was initializing the file content in the start of the for loop with > and appending to it in the subsequent if loops >>

So for scenarios where nothing to write in the...
1,482
Posted By ananan
Hi If I change the file name in the second...
Hi

If I change the file name in the second part it is writing in to that file, but if both files are same only problem occurs.
1,482
Posted By ananan
Command output redirection to file issues
Hi,

I have a peculiar issue w.r.t redirecting the command output to a file when using loop.

I am redirecting command output to same file in a series of if condition statements, but if one block...
2,022
Posted By ananan
Hi, Can any one tell me whats wrong in my...
Hi,

Can any one tell me whats wrong in my original posted code, since in my actual implementation i can not do awk exact match. Since the data will be having multiple lines of same match pattern....
2,022
Posted By ananan
i will be having files ending with *12581.log in...
i will be having files ending with *12581.log in only one of the returned path.
So i want to use that path for further processing.

simple terms awk will give three paths and definitely in one...
2,022
Posted By ananan
Hi What about assigning the output to a...
Hi

What about assigning the output to a variable if certain file exists.


bash-3.00$ awk -F: 'sub("^dict=", "") {for(j=1;j<NF;j++) system("test -f " "$j"/*12581.log)==0 { print $j }}' file.txt...
2,022
Posted By ananan
Hi I want echo "$sPath" should produce...
Hi

I want
echo "$sPath" should produce the output

/dictr/abcd/d1/wq
/dictr/abcd/d2/wq
/dictr/abcd/d3/wq
2,022
Posted By ananan
Issue in awk parsing under while loop
Hi

I am trying to parse a grep output using awk. It works fine individually and not working under the loop with variable name assigned.


cat > file.txt...
2,943
Posted By ananan
Hi It works fine, if you find time, Please...
Hi

It works fine, if you find time, Please explain. What about case insensitivity for the pattern. How to incorporate in this code.
4,368
Posted By ananan
Xmllint parser error : EntityRef: expecting ';'
Hi

I have an XML file which contains html urls in that node values. When i use xmllint to parse that, i am getting error (because of the sympols in the url). i have used --html option but it...
2,943
Posted By ananan
I am getting error. bash-3.00$ awk 'match...
I am getting error.

bash-3.00$ awk 'match ($0, PAT) && ++T[substr($0, RSTART, RLENGTH)]<4' PAT="abc|bcd|cde" file2.txt
awk: syntax error near line 1
awk: bailing out near line 1

but works...
2,943
Posted By ananan
Hi, SAy the sample file is (actual file size...
Hi,

SAy the sample file is (actual file size is big 15 MB)


and i am doing an egrep for the patterns abc, bcd, cde and i need to print the matching lines just three times per pattern.

egrep...
2,943
Posted By ananan
Egrep patterns in a file and limit number of matches to print for each pattern match
Hi

I need to egrep patterns in a file and limit number of matches to print for each matched pattern.

-m10 option is not working out in my sun solaris 5.10

Please guide me the options to...
1,814
Posted By ananan
With a minor change in hour field, i got the...
With a minor change in hour field, i got the expected result. Thank you so much.
ps -p "25936" -o etime= | awk -F"[-:]" '{print (NF==4?$1*86400:0)+(NF>2?$(NF-2)*3600:0)+$(NF-1)*60+$NF}'
735251
1,814
Posted By ananan
Same results... etime is working and not etimes ...
Same results... etime is working and not etimes

---------- Post updated at 11:22 AM ---------- Previous update was at 09:17 AM ----------

bash-3.00$ ps -p "25936" -o etime=
8-12:14:11...
1,814
Posted By ananan
In path variable /usr/bin:/usr/ucb:/etc is...
In path variable /usr/bin:/usr/ucb:/etc is available and I am using sun OS 5.10
1,814
Posted By ananan
List out Process ids restarted today
Hi,

I need to list out the processes which are started/restarted today in my Solaris box. If not possible need to convert the process uptime in minutes or seconds and compare it with a...
Showing results 1 to 22 of 22

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