Search Results

Search: Posts Made By: RavinderSingh13
545
Posted By RavinderSingh13
Hello sagar_1986, Again you are missing the...
Hello sagar_1986,

Again you are missing the point, request to you is to add your efforts in form of code; so kindly do so and let us know then.

Thansk,
R. Singh
545
Posted By RavinderSingh13
Hello sagar_1986, Could you please do share...
Hello sagar_1986,

Could you please do share your efforts which you have put in order to solve your own problems?
We encourage users to learn coding on this forum, so please do share so.
...
273
Posted By RavinderSingh13
Hello genehunter, This could be easily done...
Hello genehunter,

This could be easily done with bash, could you please try following.
I am using parameter expansion functionality of bash here.


val="_"
for file in *.bum
do
...
273
Posted By RavinderSingh13
Hello genehunter, Thanks for showing your...
Hello genehunter,

Thanks for showing your efforts in form of codes.

But your all shown output sample file names CMRLPCR000020_M.bum are same. Wouldn't it overwrite the file, since all file...
463
Posted By RavinderSingh13
Hello jeo_fb, Sorry but this is NOT the way...
Hello jeo_fb,

Sorry but this is NOT the way UNIX.com forums work. We do encourage people to add their efforts which they have put in order to solve their own problems, so please do add your...
512
Posted By RavinderSingh13
Hello shanul karim, Sorry but this is NOT...
Hello shanul karim,

Sorry but this is NOT the way UNIX.com forums work. We do encourage people to add their efforts which they have put in order to solve their own problems, so please do add your...
189
Posted By RavinderSingh13
Hello Nez, Cool; thanks for letting your...
Hello Nez,

Cool; thanks for letting your views , but IMHO why I added that checks in case version is in some other format then it shouldn't have false positive in output.

Thanks,
R. Singh
189
Posted By RavinderSingh13
Regex learning.
Hello All,

I have come across a question from colleague about complex regex, so I written a regex using grep's -P option in PCRE regex. Since its a new learning for me, so thought to share with...
323
Posted By RavinderSingh13
Hello rohit_shinez, In unix.com we encourage...
Hello rohit_shinez,

In unix.com we encourage all users to do add their efforts which they have put to solve their own problem so kindly do add the same and let us know then.

Thanks,
R. Singh
Forum: What is on Your Mind? 1 Week Ago
639
Posted By RavinderSingh13
Thanks a TON Neo for awarding this to...
Thanks a TON Neo for awarding this to Scrutinizer, a well deserved award S :b:

@Scrutinizer, First of all congrats S :b: First thing first, your posts are Good, concise, Up to the mark, full of...
455
Posted By RavinderSingh13
Hello becal123456, IMHO problem in your code...
Hello becal123456,

IMHO problem in your code is that you haven't done any increment on very first occurrence of a[$2 FS $4 FS $5 FS $6 FS $7] and when it goes into condition check happens first...
455
Posted By RavinderSingh13
Hello beca123456, Could you please try...
Hello beca123456,

Could you please try following.


awk '/^grp1/{print;a[$2,$4,$5,$6,$7]++;next} !a[$2,$4,$5,$6,$7]++' Input_file


Output will be as follows.


grp1 name2 ...
601
Posted By RavinderSingh13
Hello hungryd, Could you please try...
Hello hungryd,

Could you please try following.


awk '
{
while(match($0,/<SeriesName>[^<]*/)){
print substr($0,RSTART+12,RLENGTH-12)
$0=substr($0,RSTART+RLENGTH)
}
}
' ...
Forum: Shell Programming and Scripting 3 Weeks Ago
695
Posted By RavinderSingh13
Hello pranabpal, In UNIX.com we encourage...
Hello pranabpal,

In UNIX.com we encourage users to add 3 simple things.

1- Sample of Input in CODE TAGS.
2- Sample of expected output in CODE TAGS.
3- Most important thing, add efforts which...
Forum: Programming 3 Weeks Ago
708
Posted By RavinderSingh13
Thanks for sharing nice code wisecracker :b: ...
Thanks for sharing nice code wisecracker :b:
Please forgive me if I am wrong here, I believe shebang should be #!/bin/bash right?
Or please correct me if I missed something here, cheers.

Thanks,...
Forum: Shell Programming and Scripting 3 Weeks Ago
240
Posted By RavinderSingh13
Use parameter expansion over a parameter expansion in bash.
Hello All,

Could you please do help me here as I would like to perform parameter expansion in shell over a parameter expansion.

Let's say I have following variable.
...
531
Posted By RavinderSingh13
Hello Tuxidow, Could you please try...
Hello Tuxidow,

Could you please try following.


awk -F'\\|\\^' '$3==""{next} $4' Input_file


NOTE: After seeing Rudi sir's comment edited this solution now.

Thanks,
R. Singh
Forum: What is on Your Mind? 4 Weeks Ago
1,081
Posted By RavinderSingh13
Thanks a TON Neo for giving me this GREAT honor...
Thanks a TON Neo for giving me this GREAT honor :b:, its always an honor to be a member of this GREAT site :b:, whatever I know in scripting/*nix I learnt from this forum/site and whatever way or...
571
Posted By RavinderSingh13
Hello gc_sw, On UNIX.com we do encourage...
Hello gc_sw,

On UNIX.com we do encourage users to add their efforts which they have put in order to solve their own problems.
So kindly do edit your post and add the attempted code by you and let...
602
Posted By RavinderSingh13
Hello big123456, IMHO I think you are...
Hello big123456,

IMHO I think you are looking for grep -l option, since it will only print Filenames which have that specific text in them, try something like:


find /tmp/ -type f -exec grep...
676
Posted By RavinderSingh13
Thank you :) For your questions, why a[$1]...
Thank you :)

For your questions, why a[$1] didn't throw errors because if any variable is NOT initialized in awk and we are using it in any condition or etc then its value will be considered as...
676
Posted By RavinderSingh13
Hello beca123456, Could you please try...
Hello beca123456,

Could you please try following.


awk 'BEGIN{FS=OFS="|"} FNR==NR{b[$1]=length($3)>a[$1]?$3:b[$1];a[$1]=length($3)>a[$1]?length($3):a[$1];next} length($3)<a[$1]{$3=b[$1]} 1' ...
1,069
Posted By RavinderSingh13
Hello abhaydas, Always try to following rule...
Hello abhaydas,

Always try to following rule of 1 thread ==> 1 question please.

Geeks have really helped you in this thread, so for future users who want to get reference from this thread, will...
797
Posted By RavinderSingh13
Hello kumarinfa, For Thanking someone on...
Hello kumarinfa,

For Thanking someone on Unix.com you could HIT THANKS button at the left corner of each post.

For your other question in your previous post, I believe my same command should...
1,069
Posted By RavinderSingh13
Your Welcome. On unix.com we Thank people for...
Your Welcome. On unix.com we Thank people for useful posts by hitting THANKS button at each post's last left side, you could do so too, cheers and happy learning.

Also don't forget to put code...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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