Search Results

Search: Posts Made By: mallak
2,307
Posted By mallak
Thank you so much.. Worked like a charm. however...
Thank you so much.. Worked like a charm. however still cannot understand logic. If you get a chance can you please help explain
2,307
Posted By mallak
awk name pair values
Team,

I have a file like below

FILE:

NAM1,KEY1,VAL1
NAM1,KEY2,VAL2
NAM1,KEY3,VAL3
NAM2,KEY1,VALA
NAM2,KEY2,VALB
NAM2,KEY3,VALCOutput:

I have to build commands like below

<Script>...
2,976
Posted By mallak
Sorry for being so dumb. No error now, but...
Sorry for being so dumb.

No error now, but didn't match my requirement
2,976
Posted By mallak
Getting error below awk '/^ *LOCALHOST \*...
Getting error below

awk '/^ *LOCALHOST \* r$/ {sub(/^ */,"#"} 1' <File>
awk: /^ *LOCALHOST \* r$/ {sub(/^ */,"#"} 1
awk: ^ syntax error

In a file i have quite a few line and two of them...
2,976
Posted By mallak
Sorry Rudy, I didn't get what that mean. The file...
Sorry Rudy, I didn't get what that mean. The file in which I am trying to manuplate is generated by a software which I don't have control on how to generate the lines.
2,976
Posted By mallak
Hi Rudi, Unfortunately that file is created...
Hi Rudi,

Unfortunately that file is created by IBM TSA software, so plan is to modify that as is through automation process.

Thanks
2,976
Posted By mallak
Yeah that right . Not working
Yeah that right . Not working
2,976
Posted By mallak
Thanks for the response I could see the...
Thanks for the response

I could see the condition as a

[space]LOCALHOST[space]*[space]r

Replace it with

#LOCALHOST[space]*[space]r
2,976
Posted By mallak
Ravinder Thanks for your response. I didn't...
Ravinder

Thanks for your response. I didn't got the expected result.

This is what I am trying to achieve

I have a file with many lines and among them Above are two lines.

Out of which I...
2,976
Posted By mallak
Need help with sed to match and replace a string
friends I am struck in a situation where I need to comment a line start with space as below in a file

root@LOCALHOST * rw
LOCALHOST* r
I should comment second line only

Any...
1,699
Posted By mallak
My SINCERE Thanks to in2nix4life and Don for...
My SINCERE Thanks to in2nix4life and Don for their valuable suggestions that helped me to complete the code and get the desired results.

I am thankful to all other members and i hope my post helps...
1,699
Posted By mallak
Hi Don Thanks for your response ...
Hi Don

Thanks for your response

We have input file like below

MONDAY###SELECT BLAH,BLAH,... FROM TABSCHEMA1.TABNAME1 WITH UR
SUNDAY###SELECT BLAH,BLAH,... FROM TABSCHEMA2.TABNAME2...
1,699
Posted By mallak
Thank you for your responses. I tried...
Thank you for your responses.

I tried its working as expected.

I need to get that inside awk, can I use SED?

Can I use awk inside awk?
1,699
Posted By mallak
Help with regular expression
Hi All

We have a file with statements like below

SELECT BLAH,BLAH,... FROM TABSCHEMA1.TABSCHEMA1 WITH UR
SELECT BLAH,BLAH,... FROM TABSCHEMA2.TABSCHEMA2 WHERE BLAH=1 WITH UR
.
.
....
2,398
Posted By mallak
Hi Wise, I am very thankful for the...
Hi Wise,

I am very thankful for the solution. I was able to tweak accordingly for my requirement.

I appreciate your extended help in weekend also.

Ahmed

My Actual Response...
2,398
Posted By mallak
Hi Wise, Thanks for your Quick Reply ...
Hi Wise,

Thanks for your Quick Reply

Sorry forgot to inform that

Address Varible might have Mutiple Lines. in Example i gave only 3 lines, what if we have a variable number of lines
...
2,398
Posted By mallak
[Solved] Need Help in reading Response file
Hi All,

I have a requirement to read response file which looks like below

Ex:

NAME=SAM
DOB=01/01/1980
ADDRESS=
7658 James Street
NewYork
0000


Now, I need to take...
3,471
Posted By mallak
As of now i was planning to use awk .. havent...
As of now i was planning to use awk .. havent tried any code..planning to use awk

---------- Post updated at 08:44 PM ---------- Previous update was at 08:43 PM ----------


cut -d\ -f3- file...
3,471
Posted By mallak
How to Print from matching word to end using awk
Team,

Could some one help me in Printing from matching word to end using awk

For ex:

Input:

I am tester for now
I am tester yesterday
I am tester tomorrow

O/p

tester for...
16,524
Posted By mallak
Thanks franklin..suites for my...
Thanks franklin..suites for my requirements..Thanks once again for your kind help
16,524
Posted By mallak
Thanks for your patience franklin, One more...
Thanks for your patience franklin,

One more question:The above code is checking both apply_server and apply_schema..My need is that o/p shuld come if either one is existing..
My input can have...
16,524
Posted By mallak
Thanks for relply But that prints like this ...
Thanks for relply
But that prints like this

apply_server=1
apply_schema=2
apply_server=3
apply_schema=4

I want o/p like
apply_server=1 apply_schema=2
apply_server=3 apply_schema=4
...
16,524
Posted By mallak
Thanks franklin, Its olved problem to one...
Thanks franklin,

Its olved problem to one extent..a quick question

Input

asnqcap apply_server=1 capture_schema=2

I want o/p with both apply_server and capture_schema

From above code i...
16,524
Posted By mallak
Thanks once again .. just a one more question ...
Thanks once again .. just a one more question

Now that i got o/p like
apply_server=DBNAME apply_schema=ASN

My Question is from this O/P i need to get only

apply_server=DBNAME

Please...
16,524
Posted By mallak
Thanks a lot So i understood that using...
Thanks a lot

So i understood that using above code awk will scan each line and will return values 1 and 2

asnapply 1 2 3 apply_server=1 apply_schema=ASN
asnapply 1 2 3 apply_server=2...
Showing results 1 to 25 of 27

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