Search Results

Search: Posts Made By: RavinderSingh13
Forum: What is on Your Mind? 1 Week Ago
485
Posted By RavinderSingh13
Thanks a TON Neo for inviting Dave in MODs team...
Thanks a TON Neo for inviting Dave in MODs team :b:

A warm Welcome Dave in MODs group :b: :b:

Thanks,
R. Singh
Forum: What is on Your Mind? 1 Week Ago
349
Posted By RavinderSingh13
Thanks a TON Neo for informing us on same. I am...
Thanks a TON Neo for informing us on same. I am able to access site without any issues and hope all others would also be. Cheers for UNIX.com :b:

Thanks,
R. Singh
515
Posted By RavinderSingh13
Hello jiam912, We encourage users to add...
Hello jiam912,

We encourage users to add their efforts which they have put in order to solve their own problems in their post.
So kindly do let us know what you have tried to solve this?
...
662
Posted By RavinderSingh13
Hello sand1234, Following is the complete...
Hello sand1234,

Following is the complete explanation on same.

awk ' ##Starting awk command here.
{
ORS=length==80?"":RS ##Setting ORS by checking condition if...
662
Posted By RavinderSingh13
Hello sand1234, Here is the explanation of...
Hello sand1234,

Here is the explanation of it:

As you could see there are 2 %s written in printf which are connected to following.

%s -----> length($0)==80?ORS:""
%s -----> $0

1st one...
662
Posted By RavinderSingh13
Hello sand1234, Could you please try...
Hello sand1234,

Could you please try following(not tested though).

awk '{printf("%s%s",length($0)==80?ORS:"",$0)} END {print ""}' unwrap2.txt


Thanks,
R. Singh
662
Posted By RavinderSingh13
Hello sand1234, When I ran code for your...
Hello sand1234,

When I ran code for your samples it worked fine for me, if still it is giving no new line at last edit it like:

awk '{printf("%s%s",$0~/^[0-9]+/ &&...
662
Posted By RavinderSingh13
Hello sand1234, Could you please try...
Hello sand1234,

Could you please try following.


awk '{printf("%s%s",$0~/^[0-9]+/ && FNR>1?ORS:FNR==1?"":OFS,$0)}' Input_file


Output will be as follows.


2019 Sep 28 10:47:24.695...
Forum: What is on Your Mind? 4 Weeks Ago
960
Posted By RavinderSingh13
For me Dark Green color looks great :cool: :b: ...
For me Dark Green color looks great :cool: :b:
Thanks Neo for doing this.

Thanks,
R. Singh
613
Posted By RavinderSingh13
Hello akopocpoypoy, Or adding 1 more...
Hello akopocpoypoy,

Or adding 1 more approach where no need to hard code string again and again, simply keep a string into a variable Oct in this case and need not to change anything in code.
...
613
Posted By RavinderSingh13
Hello akopocpoypoy, Could you please try...
Hello akopocpoypoy,

Could you please try following.

awk '
{
while(match($0,/Oct [0-9]+/)){
val=sprintf("%s %02d",substr($0,RSTART,4),substr($0,RSTART+3,RLENGTH-3))
sub(/Oct...
579
Posted By RavinderSingh13
Hello shellnewuser, Could you please try...
Hello shellnewuser,

Could you please try following.


awk 'BEGIN{OFS=","} /\*\*\*END\*\*\*/{if(val){print val};print;val="";next} /^abc/{print;next} {val=(val?val OFS:"")$0}' Input_file

...
Forum: What is on Your Mind? 10-05-2019
1,233
Posted By RavinderSingh13
Thanks a lot Neo for inviting such a great...
Thanks a lot Neo for inviting such a great experience and talent into forums :b:

Welcome aboard Nicki Paul in MODs group :b: :b:

Thanks,
R. Singh
712
Posted By RavinderSingh13
Hello dr_xemacs, Could you please try...
Hello dr_xemacs,

Could you please try following once.


awk '{while(match($0,/<[^>]*>/)){print substr($0,RSTART+1,RLENGTH-2);$0=substr($0,RSTART+RLENGTH)}}' Input_file


Thanks,
R. Singh
1,488
Posted By RavinderSingh13
Hello jcdole, Yes, that could be shorten to...
Hello jcdole,

Yes, that could be shorten to following.

MY_PATTERN="="
SOME_VAR=$(awk -F"$MY_PATTERN" '{split($1,array," ");print array[3]}' Input_file)
echo "$SOME_VAR"


Thanks,
R. Singh
156
Posted By RavinderSingh13
Hello mohdsadik90, We have different forum...
Hello mohdsadik90,

We have different forum for Homework and classroom work. Please go through that and fullfil all details for it and you will get appropriate guidance on your question.

Thanks,...
973
Posted By RavinderSingh13
Hello arunkumar_mca, Could you please try...
Hello arunkumar_mca,

Could you please try following too.

awk 'BEGIN{FS=OFS=";"} FNR==NR{a[$1]=$2;next} ($1 in a){print $0,a[$1]}' Input_file2 Input_file1


Thanks,
R. Singh
Forum: What is on Your Mind? 09-16-2019
1,475
Posted By RavinderSingh13
Thanks a TON Neo for sharing it :b:, I am very...
Thanks a TON Neo for sharing it :b:, I am very very happy by seeing these results.

Thanks,
R. Singh
Forum: Programming 09-15-2019
313
Posted By RavinderSingh13
Regarding a GREAT site for understanding and Visualizing regex patterns.
Hello All,

While googling on regex I came across a site named Regulex Regulex´╝ÜJavaScript Regular Expression Visualizer (https://jex.im/regulex/#!flags=&re=%5E(a%7Cb%7Cc)(%5B%5E%40%5D*)%40(.*))
I...
Forum: What is on Your Mind? 09-06-2019
1,972
Posted By RavinderSingh13
Thanks a TON Neo for doing so :b: Welcome...
Thanks a TON Neo for doing so :b:

Welcome Yoda(one of my inspirations in scripting) to the MODs group :b:

Thanks,
R. Singh
Forum: What is on Your Mind? 09-03-2019
1,977
Posted By RavinderSingh13
Thanks Neo for doing so :b: Welcome to MODs...
Thanks Neo for doing so :b:

Welcome to MODs group Akshay :b:

Thanks,
R. Singh
966
Posted By RavinderSingh13
Hello mrcool4, On unix.com we encourage...
Hello mrcool4,

On unix.com we encourage users to post their efforts in their question which they have put in order to solve their own problems.
So kindly do so and let us know then.

Thanks,...
Forum: What is on Your Mind? 08-18-2019
2,688
Posted By RavinderSingh13
Thanks a TON Neo for doing this :b: Welcome...
Thanks a TON Neo for doing this :b:

Welcome to MODs group Peasant, you ROCK :b:

Thanks,
R. Singh
836
Posted By RavinderSingh13
Hello harveyclayton, Please post samples of...
Hello harveyclayton,

Please post samples of input and expected output along with what you have tried to solve your own problem.

Thanks,
R. Singh
2,137
Posted By RavinderSingh13
Hello ranjancom2000, We encorage users to...
Hello ranjancom2000,

We encorage users to post their efforts which they are putting to solve their own problem. Please always do add same in CODE TAGS.

Thanks,
R. Singh
Showing results 1 to 25 of 500

 

Featured Tech Videos

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