Search Results

Search: Posts Made By: danmauer
4,309
Posted By danmauer
Thanks. i will use "$0"
it's a cleaner solution then the ps + greping + awk... thanks again for your help.
4,309
Posted By danmauer
THANKS TO ALL
Doh! on my part... works great now

i was missing at the top of my script the --> #!/bin/ksh

#!/bin/ksh
process_name=$(ps -ef | grep TEST_PROCESS_OUT | grep -v grep | awk '{print $9}')
echo...
4,309
Posted By danmauer
Capturing running process name
i'm looking to have my script capture it's own process name while running.

i'm going to use this in the output of the script to track which script produced which output file(s).

when i run:...
4,157
Posted By danmauer
egrep string except when preceded by underscore
having trouble with this seemingly simple taks.. :mad:

Test data:



we want to keep lines 2,3 & 4

-- want to exclude when ${.*schema} is preceded with an underscore; Valid {.*schema}...
4,853
Posted By danmauer
ahhhhh.. that's where i was getting confused.......
ahhhhh.. that's where i was getting confused....

Thanks for your patience.
4,853
Posted By danmauer
Can the start and end of the range be on the same...
Can the start and end of the range be on the same line? like my 2 data examples above?
2,050
Posted By danmauer
functionality diff. between SED versions
does anyone know of a matrix that would show the functionality differences between different versions of SED?

like some versions you can't use '<anything>+' for one to many occurences of...
4,853
Posted By danmauer
i've tried the following.... sed -e '/[ ][...
i've tried the following....

sed -e '/[ ][ ]*[Ss][Ee][Ll][Ee][Cc][Tt][ ][ ]*/,/;/!d' -e '/;/G'

but still getting the following results... one bad result. :confused:
4,853
Posted By danmauer
i'm trying come up with a slightly different...
i'm trying come up with a slightly different usage for when the word "select" is NOT solely on a line...

for the following test data:



and i'm trying to get the "GOOD" data with the...
4,853
Posted By danmauer
thanks... guess i couldn't see the forest for the...
thanks... guess i couldn't see the forest for the trees.... a space doesn't need to be [ ]

thanks agains
4,853
Posted By danmauer
i was trying to match either a space or end of...
i was trying to match either a space or end of line after the word "select" -

Ultimately what i'm trying to do is extract from a file each SQL Select statement ending with a semicolumn
4,853
Posted By danmauer
Using REGEX within SED range search
test data:




Code:


sed -n '/^[ ]*[Ss][Ee][Ll][Ee][Cc][Tt][ ]*$*/,/;/{/;/G;p;}'


What i'm trying to do with the above regex (in bleu)


identify upper/lower case select only...
14,689
Posted By danmauer
Thanks, the first worked, but the /I,/ didn't...
Thanks, the first worked, but the /I,/ didn't work...

but i had to add back after the select [ ]*$ because: (which works for 1 & 2 below but not 3)

1. i don't want to catch occurences of...
14,689
Posted By danmauer
Awsome!...... in my quest to understand the hows...
Awsome!...... in my quest to understand the hows and whys of SED, ( so as not to just be a coding monkey :)) could you explaing the part in red

sed -n '/select/I,/;/{/;/G;p}

i beleive...
14,689
Posted By danmauer
SED - adding blank line after each Range Match
the following range matching works great but i wish to add a blank line after each range result set... which i've tried and researched to no avail

MY INPUT DATA:




CURRENT CODE I'M...
4,930
Posted By danmauer
Thanks again for your time and patience.
Thanks again for your time and patience.
4,930
Posted By danmauer
just to firm up my understanding... below...
just to firm up my understanding...

below pattern means:

Single quote + none or any number of non-spaces before } + } + double quote + single quote + period + none or any number of non-spaces...
4,930
Posted By danmauer
Thank you
in summary: (to firm up my understanding)

1) the } doesn't need an escape backslash before it, as it's interpreted literally within the double quotes surounding the pattern.

2) there's no...
4,930
Posted By danmauer
My bad.....
needed a space before the single quote that incapsulates all that comes after the nawk line..... i appologize..
4,930
Posted By danmauer
the single quote you removed at the end of the...
the single quote you removed at the end of the nawk line (i think ??) encapsulates the whole rest of the expression... no?



nawk -v pat="\}\"\'\."'
{
if (match($0,...
4,930
Posted By danmauer
sample data file: output to be 2...
sample data file:



output to be 2 results

1rst result for "${Gedwschema}"'.plcy_sts
2nd result for '"${Gedwschema}"'.vhcl
4,930
Posted By danmauer
NAWK - seach pattern for special characters - } dbl qt - sng qt
i'm puzzled....

trying to look for the pattern }"'. but the below code returns to me the message below (pattern is curley queue + dbl qt + sng qt + period)





nawk -v pat="\}\"\'\."'...
24,631
Posted By danmauer
Thanks again for you help and patience...
Thanks again for you help and patience...
24,631
Posted By danmauer
Thanks.... but trying to understand...
could you explain the syntax?

[^/]* means zero to many of any charaters other then /

---- but why have [^/] that twice?

and why didn't what i have work?

:[$a-zA-Z_ ]+\/

doesn't...
24,631
Posted By danmauer
i've put the following into a file and ran it and...
i've put the following into a file and ran it and got the same correct results as Jim below


echo "mds_ar/bin/uedw92wp.ksh: $AI_SQL/mthly.sql
mds_ar/bin/uedw92wp.ksh: $EDW_TMP/wkly.sql" |
...
Showing results 1 to 25 of 45

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