Search Results

Search: Posts Made By: ghoda2_10
1,540
Posted By ghoda2_10
substituting the character ")" in gawk
Hi,

I am using gawk to substitute the character ")" with ")\n" using sub function but it gives me the following error:

gawk: cmd. line:3: (FILENAME= FNR=11) fatal: Unmatched \):/),/

The...
4,386
Posted By ghoda2_10
counting number of pattern occurrences
Hi All,

Is it possible to count number of occurrences of a pattern in a single record using awk??

for example:
a line like this:
abrsjdfhafa

I want to count the number of a character...
2,409
Posted By ghoda2_10
Thanks It worked with nawk and gawk. but...
Thanks It worked with nawk and gawk.

but the above code has one problem for example if pattern1 is character a, pattern2 is b and pattern3 is c, if the input data is in the folowing order:
a
d...
2,409
Posted By ghoda2_10
Thanks alot for all your replies but when I tried...
Thanks alot for all your replies but when I tried the below one:

awk '
/pattern1/,/pattern2/{f?f=f RS $0:f=$0}
/pattern3/{print f;f=""}
' file
there was an error in the second line:
awk:...
2,409
Posted By ghoda2_10
Saving ranges using awk
Hi All,

Is there a way to save a range in variable for later printing?

for example write somthing like this:
awk '
/pattern1/,/pattern2/{f=range}
/pattern3/{print f}
'

I don't know...
4,488
Posted By ghoda2_10
Below are two functions in the file function...
Below are two functions in the file

function $reset_report(), invisible
{
a = set_value;
return @true;
}

function $reset_palette_menu(),INDIRECT
{
if ( v == "")
$notify(message1,...
4,488
Posted By ghoda2_10
range patterns in awk
Hi All,

I am new to awk command and I had a question in using it.

I want to filter a code file and print specific functions (that contain menu word in the function name).

for example, if...
Showing results 1 to 7 of 7

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