Search Results

Search: Posts Made By: prohank
1,702
Posted By prohank
True I'm sorry.:o Adding [[:space::]] worked...
True I'm sorry.:o

Adding [[:space::]] worked just fine.

Many thanks.

Hi @MadeInGermany,

Thanks for your inputs.
1,702
Posted By prohank
Thanks RudiC. I tried your solution but its...
Thanks RudiC.

I tried your solution but its failing for this case:
input:
this.something == 'something'.that
returns:
this.something == 'something'.that

...
1,702
Posted By prohank
Hi R. Singh, Thanks for your reply. ...
Hi R. Singh,

Thanks for your reply.

Actually there could be more than one type of input statements. The provided one is just one of the type.

Let me add some more. Apologies from my part.
1,702
Posted By prohank
Match exactly a string
I am formatting my code and for that I am trying to write a script which can quicken some repetitive work.

I need to match "==" exactly in a string and replace it by inserting a (single) blank...
4,287
Posted By prohank
Thanks RudiC you have been a great help. ...
Thanks RudiC you have been a great help.

This version works exactly the way I wanted.
4,287
Posted By prohank
Well yes I read it but as I said the default file...
Well yes I read it but as I said the default file comes with | by default and it would be preferred if that wasn't replaced with something else as the files are very huge and it is not advised to...
4,287
Posted By prohank
So, I guess there's no solution for this then...
So, I guess there's no solution for this then...
4,287
Posted By prohank
Nuhuh already tried, doesn't work
Nuhuh already tried, doesn't work
4,287
Posted By prohank
To clarify a little bit, 24 is the last line of...
To clarify a little bit, 24 is the last line of my input file and source line is 1 because I ran your script by eliminating all the new lines and replacing them with semi colons.

When I run it the...
4,287
Posted By prohank
Thanks RudiC, Your solution works great with...
Thanks RudiC,

Your solution works great with tab as delimiter but I am using | and it is failing with the below error:


awk: 0602-521 There is a regular expression error.
*?+ not...
4,287
Posted By prohank
This is brilliant. Thanks @RudiC. This has...
This is brilliant. Thanks @RudiC. This has reduced a lot of manual work.

@pravin27 I think for the current situation its ok for me to mention all the columns as either a key or an agg field as...
4,287
Posted By prohank
Yes that is exactly the question. Can't we...
Yes that is exactly the question.

Can't we have a more generalised command that cover all the above scenarios?
i.e specify which column to aggregate with and which to comma separate.

Am I...
4,287
Posted By prohank
What I mean is, some tables are like: ...
What I mean is, some tables are like:


B00000 1 ... abc
B00001 1 ... abc,def
B00001 2 ... ghi
B00001 2 ... jkl
B00002 1 ... abc
B00002 2 ... def
B00003 1 ... xyz


Can we edit the code...
4,287
Posted By prohank
Thanks @RudiC that worked great. Sorry for...
Thanks @RudiC that worked great.

Sorry for the late reply. I didn't get time yesterday to check the code.

Can we make it more generalised like passing arguments such as in the example since I...
4,287
Posted By prohank
Implementing Listagg like function in shell
Hi,

Basically what I am trying to do is making multiple fields of the same type comma-separated.

i.e. for a data like this:

B00000 abc
B00001 abc,def
B00001 ghi
B00001 jkl
B00002 abc...
3,854
Posted By prohank
Didn't have that requirement but nice to know. ...
Didn't have that requirement but nice to know.
Thanks :)
3,854
Posted By prohank
@MadeinGermany using -e did the trick. @Don...
@MadeinGermany using -e did the trick.

@Don it works

Thanks all.
3,854
Posted By prohank
Thanks @Aia that did exactly what I wanted. ...
Thanks @Aia that did exactly what I wanted.

Got to do some studying on perl. Can this be achieved using sed or awk?

@RudiC Will take care next time. Thanks for your inputs too.
3,854
Posted By prohank
I am getting something like this with your...
I am getting something like this with your command

"The label :L; s/||/|-|/g;tL is greater than eight characters."

PLEASE use code tags as required by forum rules!

May be our seds are of...
3,854
Posted By prohank
Insert a hyphen between two delimiters using sed
Hey guys,

I have a file that is delimited by | and I am trying to write a sed command to
convert this:

abc|def||ghi|jkl||||mnop

into this:

abc|def|-|ghi|jkl|-|-|-|mnop


The output...
Showing results 1 to 20 of 20

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