Search Results

Search: Posts Made By: RavinderSingh13
182
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
139
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,...
262
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? 6 Days Ago
203
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 1 Week Ago
195
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? 2 Weeks Ago
605
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? 2 Weeks Ago
621
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
508
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
1,154
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
639
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
1,184
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
1,549
Posted By RavinderSingh13
Hello cokedude, Could you please try...
Hello cokedude,

Could you please try following(I haven't tested it though).


awk '/dev/ && $5+0 > 70' Input_file


Thanks,
R. Singh
252
Posted By RavinderSingh13
Hello Adarshreddy01, IMHO that's because you...
Hello Adarshreddy01,

IMHO that's because you are passing output of cat file1 command to while loop which is considered as a new shell(or in other language creates a sub shell to execute while...
1,093
Posted By RavinderSingh13
Hello Vinod, When you see man page for ps...
Hello Vinod,

When you see man page for ps you see like.



So Rudi's code is actually comparing if a process is older then 7200 seconds which is 2 hours and if condition is TRUE it prints it...
989
Posted By RavinderSingh13
Hello mvalonso, Could you please try...
Hello mvalonso,

Could you please try following once.


awk '
BEGIN{
OFS=";"
}
/BEGIN JOB/{
if(value){
print first,value,prev
}
value=first=prev=""
flag=1
first=$NF
}...
980
Posted By RavinderSingh13
Hello arunkumar_mca, Could you please try...
Hello arunkumar_mca,

Could you please try following once.


awk '{val1=substr($0,9,6);val2=val1+0<10000?sprintf("%06d",val1*1000):val1;print substr($0,1,8) val2 substr($0,15)}' Input_file

...
1,190
Posted By RavinderSingh13
Hello Raghuram717, Could you please try...
Hello Raghuram717,

Could you please try following(haven't tested it though).


awk '/^sdg-catalog/{close(file);file=$0;next} {print > file}' Input_file


Thanks,
R. Singh
302
Posted By RavinderSingh13
Thank you Peasant and Dennis for your replies. I...
Thank you Peasant and Dennis for your replies. I have created systemctl scripts(which are eg--> stop, start applications, call specific python, shell, perl programs in them too). So lets say 1 of the...
302
Posted By RavinderSingh13
Hello Neo, Thank you for sharing the link, I...
Hello Neo,

Thank you for sharing the link, I am aware of creating systemd scripts with multiple options; I had created multiple of them. My question is related to options while running them. Like...
302
Posted By RavinderSingh13
How to create custom options of my own in systemctl Linux?
Hello All,

Greetings!!

I was trying to create a custom option in systemctl like its out of the box options eg--> status, stop, start, restart, I have tried searching in google but didn't find...
1,149
Posted By RavinderSingh13
Hello pavan, If you are ok with awk then you...
Hello pavan,

If you are ok with awk then you could try following too once.


match=$(awk '/Hello/ && !/Hi/' Input_file)


Thanks,
R. Singh
1,274
Posted By RavinderSingh13
Hello utkarshkhanna44, In case you want to...
Hello utkarshkhanna44,

In case you want to get everything(NOT exactly 30M) then you could try following.

awk -F, 'match($2,/\.[0-9a-zA-Z]+ \( [^)]* \)/){print substr($2,RSTART,RLENGTH)}' ...
1,665
Posted By RavinderSingh13
Hello DevAakash, Could you please try...
Hello DevAakash,

Could you please try following.

awk 'FNR==NR{for(i=1;i<=NF;i++){a[i]=$i};next} {print a[FNR],$2}' FS="," Input_file2 FS=":" OFS=":" Input_file1


Thanks,
R. Singh
Forum: Cybersecurity 05-16-2019
622
Posted By RavinderSingh13
**ALERT**ALERT* Whats app requesting users to upgrade to latest version as; its vulnerability found.
Hello All,

Want to share here an article for Whats app users that team whats app is requesting users to upgrade to its latest version since they have found a vulnerability; where Hacker could turn...
135
Posted By RavinderSingh13
Hello cmccabe, Could you please try...
Hello cmccabe,

Could you please try following.

awk -F, '/VPS/{num=split($4,array,"[ -]");if(num==3){print array[1],array[2]+1,array[3],$1};if(num==2){print array[1],array[2]-1,array[2],$1}}' ...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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