Search Results

Search: Posts Made By: kpg
6,936
Posted By kpg
Hi, thanks again for giving me the time to...
Hi,

thanks again for giving me the time to find out what to correct...I now run

awk '
$2 != "=" { next }
$1 == "(SERVICE_NAME" && $3 ~ s { print a }
$1 !~ /^\(/ { a=$1 }
' s="pri"...
6,936
Posted By kpg
Hi, thanks for the awk --- I do not understand...
Hi,
thanks for the awk --- I do not understand how it should work and I get an error I can not correct:

awk: cmd. line:4: error: Unmatched ( or \(: /^(/


And I'd like to search for a service...
6,936
Posted By kpg
Get the tnsnames.ora alias for a given service name
Hello,

puzzling me now way to long....so hopefully someone has the answer at hand:
The following shows a sample tnsnames.ora from another topic.
What I want to get as result the tnsnames alias...
10,545
Posted By kpg
hi ahmad.diab, as you wrote, "line break do...
hi ahmad.diab,

as you wrote, "line break do not make a difference when writing in correct format". Not wasting too much time I escaped _all_ the linebreaks I've added for readability in "my" awk...
10,545
Posted By kpg
Hi, thank you! You helped me so...
Hi,

thank you! You helped me so much.:rolleyes: This code works as wanted.

But when I tested and added some line breaks here and there to improve readability, the script didnt stop when fileA...
10,545
Posted By kpg
exactly as you wrote. a sample output of my...
exactly as you wrote.

a sample output of my old awk script (calling sed via system, which is sloow) you see below.

The output consists of 2*n lines.
- odd lines are from fileA. Each odd ouput...
10,545
Posted By kpg
Thank you for your reply. I'll try to explain...
Thank you for your reply. I'll try to explain what I want to do:

fileA is:
000000011111000
000000329100001
000000330100001

the contents indicate line numbers (position 0 to 8) to look for in...
10,545
Posted By kpg
ahmad.diab, I am sorry, but I do not understand...
ahmad.diab, I am sorry, but I do not understand how this code works. I need to modify it


awk 'BEGIN { ...set some variables
}

{ # main
# set variables based on substrings of $1, e.g ...
10,545
Posted By kpg
Thank you! This is indeed very cool awk - I am...
Thank you! This is indeed very cool awk - I am still struggling how it works, how to use it and add additional code.:confused:

How is the performance of this code? My files have about 2,5 million...
10,545
Posted By kpg
awk script: print line number n of another file
Hi,

I wrote an awk script to analyse file A.
I call the script with files A and B. File A has lines like:


000000033100001
000000036100001
000000039100001

The first 9 characters are...
Showing results 1 to 10 of 10

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