Hi gurus,
I have a requirement where I need to parse a string for a pattern and drop it if that pattern occurs. Here's my requirement:
Input data:
record start
string("|" ) number = NULL("");
date("YYYYMMDD")("|") start_date = NULL("");
decimal("|") type = NULL("");
string("\n") name = NULL("");
end;
My output that I need is :
string number
date start_date
decimal type
string name
So basically I need to output just the column type and column name in my output. I dont care if the delimiter b/w two fields is a space or pipe or anything... I was trying to use sed and drop the pattern start from ( till ) and print first two fields but it didnt work.
Any help is appreciated.
Thanks,
Carl