Tuesday, 29 October 2019

Self levitating holy stone at Kamar ali durvesh dargah!

It's rightly said, faith can move mountains. Although, we may not be able to witness such a thing, we can definitely witness faith moving a fragment of it, in the holy Kamar ali durvesh dargah. Situated on the pune-satara highway, is this 700 years old dargah. Devotees from all walks of life throng here round the year to witness this miracle first hand.







Even science has not been able to explain the miracle of self levitating holy stone. This stone is around 90kgs in weight. But when 11 people come together, place their index finger below this stone, and chanting the holy name of 'Kamar ali durvesh' lift the stone to nearly 10 feet above the ground, we are naturally inclined to believe that miracles do happen provided we have enough faith!




I myself became party to this holy event on my recent visit to this pious dargah few days back. Video below :)



This place is known to fulfill the desires and hence invites people from all castes , religions etc. alike.
And it's nearness to highway makes it convenient to reach. One can offer prayer and tie thread on the holy border. And can offer chadar etc. to pay respect.

I really enjoyed my visit and am pretty sure there would be more such visits in near future!!

PS: Let me know in case of any query (s), and I will try to respond as soon as I can.

Happy travelling!!!

Friday, 11 October 2019

How to use awk to modify the file on Linux

Hi,

Am giving a sample use case here.

Say, there is a file called detectionData.csv which has data separated with pipe symbol ( | )

And, you wish to update the 5th column of all the records, you can use something like below:

cat detectionData.csv | awk 'BEGIN { OFS=FS="|" } { $5="PartyExtreme00003"; print }' > detectionDataNew3.csv

Now, say, you wish to do the above but only every 10th row and not all the rows, you can use something like below:

cat detectionData.csv | awk 'BEGIN { OFS=FS="|" } { if (NR % 10==1) {$5="PartyExtreme00001"}; print }' > detectionDataNew10.csv

And, now say, you wise to do for part of the file, say for the first 50000 records, you can use something like below:

cat detectionData_1L.csv | awk 'BEGIN { OFS=FS="|" } { if (NR < 50000) {$5="PartyExtreme00001"} else {$5="PartyExtreme00003"}; print }' > detectionData_1L_50_50.csv
Enjoy!

How to copy files from Linux machine to Windows machine

Hi,

This is what you need to do:

1. Install putty on your local windows machine via below link

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

2. By default, it will get installed at below location (for 64 bit machine)

C:\Program Files\PuTTY



3. Copy your key file i.e. .ppk file at the above location (see, baseline.ppk as e.g. copied above)

4. Now, open command window from this same location (Shift + Right Click, select Open command window here Option)

5. Run the below command (say, to copy 165.zip from home location on the Linux server to this location)

 .\pscp.exe -i ".\baseline.ppk" ec2-user@10.220.XXX.XXX:165.zip .

Notice the . at the end, this actually means, copy to this current location. You can give any actual path here to copy to that location(say, D:\Here)

  .\pscp.exe -i ".\baseline.ppk" ec2-user@10.220.XXX.XXX:165.zip D:\Here
Likewise,  if you want to copy the file not from the home directory but from other location on the server, say, /home/ec2-user/rahul/, below command can be used

  .\pscp.exe -i ".\baseline.ppk" ec2-user@10.220.XXX.XXX:/home/ec2-user/Test.txt D:\Here
Done!

Hope you find it useful.. let me know in the comment section in case of any query!