# Calculate the distance between two geographic coordinates points (latitude longitude)

h(){ echo \$@|awk '{d(\$1,\$2,\$3,\$4);} function d(x,y,x2,y2,a,c,dx,dy){dx=r(x2-x);dy=r(y2-y);x=r(x);x2=r(x2);a=(sin(dx/2))^2+cos(x)*cos(x2)*(sin(dy/2))^2;c=2*atan2(sqrt(a),sqrt(1-a)); printf("%.4f",6372.8*c);} function r(g){return g*(3.1415926/180.);}';}
The Haversine formula determines the great-circle distance between two points on a sphere given their longitudes and latitudes.
Sample Output
```# input (format: latitude1 longitude1 latitude2 longitude2) :

h -22.9077611 -43.1259322 -22.9121089 -43.2301558

# output:
10.6889

# So, the distance between -22.9077611 (latitude),-43.1259322 (longitude) and -22.9121089,-43.2301558 (latitude,longitude) is 10,688.9 meters (10.6889 kilometers)```

3
2019-04-04 01:34:36

### What Others Think

Well calculated https://eyelashextensionssyracuseny.com
geebranz · 161 weeks and 3 days ago
IT LABS PRO est la meilleure société de services d'ingénierie informatique au Maroc, en vous déplaçant à son siège à Marrakech - gueliz vous allez bénéficier des meilleurs services de création de sites et applications de gestion web, cette dernière privilégie ses clients et mettez à leur disposition toutes ses ressources pour l'accomplissement de leurs projets tout en offrant son expertise en conseillant ses clients et les accompagnant pour améliorer leurs images sur intérêt et mieux gérer leurs business. Creation site web maroc
itlabspro · 116 weeks and 4 days ago
If you love to wear movies and celebrity outfits so So here's the Tom Cruise bomber jacket for you, this jacket is available in two different types of leather so upgrade your style with this amazing tom cruise leather jacket.
emmawatson3848 · 106 weeks and 3 days ago
Amazing! This blog looks just like my old one! It's on a completely different subject but it has pretty much the same layout and design. Wonderful choice of colors! Pug Puppies for Sale Near Me PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under \$500 Near Me pug puppies for sale in texas pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio
rahimhh21 · 95 weeks and 5 days ago
weathers · 94 weeks and 5 days ago
Pug pups for sale are utterly gorgeous, affectionate, and intelligent. Excellent pedigrees, gorgeous coats, finely formed ears, a tight, curled tail, outstanding faces, and a superb conformation like their parents are all present in these puppies. The parents are both in wonderful health and are kind and devoted family members. They will arrive fully registered with the AKC, with pedigree papers, and with a one-year health guarantee. Pug Puppies for Sale Near Me pugs puppies for sale teacup pugs for sale pug puppies for sale by owner pug puppies ohio PUG PUPPY FOR SALE NEAR ME PUG PUPPIES FOR SALE pug puppies for sale in kentucky Pug Puppies for Sale Under \$500 Near Me pug puppies for sale in texas pug puppies for sale \$200 pugs for sale near me under \$500 pugs for sale under \$400 near me pugs for sale near me puppies for sale near me under \$500 pug puppies for sale under \$1,000 near me pug for sale pug puppies for sale under \$300 Brindle Pug Pitbull Pug Mix Pugs for sale cheap Cheap pug affordable pug puppies for sale near me black pugs for sale near me White Pugs for sale pug dog for sale free pug puppies pug puppies for sale in my area mn pug breeders pug puppies indiana pugs for sale michigan PUG PUPPY ADOPTION Pug puppies for sale Pug puppies for sale near me Pug puppies near me Pug Puppies for Sale Under \$500 Near Me Cute Pug Puppies Black pug puppies Black pug puppies for sale pug puppies for adoption black pug puppies for sale near me chihuahua pug mix puppies how much is a pug puppy teacup pug puppies baby pug puppies pictures of pug puppies pug puppies for sale in Ohio pug puppies price pug mix puppies teacup pug puppies for sale best food for pug puppy newborn pug puppies pug puppies craigslist pug puppies for sale craigslist adorable pug puppies how much does a pug puppy cost Pitbull pug mix puppies pug pit mix puppy pug puppies for sale \$200 pug puppies for sale in NJ Pug puppies for sale in Wisconsin pug puppy cost pug puppy food royal canin pug puppy royal canin pug puppy food fawn pug puppy pug puppies for sale florida pug puppies for sale in Indiana pug puppies for sale in KY pug puppies for sale in NC pug dog puppy AKC Registered Pug Puppies For sale cheap pug puppies for sale near me cheap pug puppies for sale in California cheap pug puppies for sale in nj Black Pug Puppies for sale pugs puppies for sale
ExcellentHome · 92 weeks and 3 days ago
MAXIM178 selaku situs agen slot online terbaik no 1 di Indonesia akan selalu menyediakan layanan yang terbaik dan bisa memuaskan para member setia kami. Diantara nya seperti memberikan informasi mengenai daftar provider slot gacor dan terpopuler saat ini. MAXIM178 Bukan hanya sekedar memberikan statement sebagai situs tergacor 2022 saat ini, kami membuktikan dengan memberikan jaminan garansi gacor 100% atau biasa di sebut garansi kekalahan 100%. Yang di mana apabila member baru deposit dan mengalami kekalahan pertamanya maka member berhak mengklaim garansi kekalahan 100% sesuai dengan syarat dan ketentuan yang berlaku. Menarik kan ? Main slot kalah dan bisa klaim kembali saldo nya. Promo ini hanya berlaku untuk member yang baru melakukan deposit untuk pertama kali nya. Cara klaim nya juga sangat mudah sekali. Member hanya perlu melapor ke CS Livechat MAXIM178 yang bertugas 24 jam dimana fitur klaim garansi nya terdapat di bagian pojok kanan bawah di halaman situs kami.
missmawar222 · 79 weeks and 4 days ago
Winwin838 Bukan hanya sekedar memberikan statement sebagai situs tergacor 2023 saat ini, kami membuktikan dengan memberikan jaminan garansi gacor 100% atau biasa di sebut garansi kekalahan 100%. Yang di mana apabila member baru deposit dan mengalami kekalahan pertamanya maka member berhak mengklaim garansi kekalahan 100% sesuai dengan syarat dan ketentuan yang berlaku. Menarik kan ? Main slot kalah dan bisa klaim kembali saldo nya. Promo ini hanya berlaku untuk member yang baru melakukan deposit untuk pertama kali nya. Cara klaim nya juga sangat mudah sekali. Member hanya perlu melapor ke CS Livechat Winwin838 yang bertugas 24 jam dimana fitur klaim garansi nya terdapat di bagian pojok kanan bawah di halaman situs kami.
loanabilly · 71 weeks and 3 days ago
Buy Chronic Pain Pills Online Without Medical Card ADHD Meds Without Prescription USA\ UK Anti Anxiety Medications For Sale USA Weight Loss Drugs For Sale Without Prescription Psychedelic For Sale Discreet Delivery Where To Buy Research Chemicals Online https://naturaldrugsstoreonline.com/ https://naturaldrugsstoreonline.com/product-category/pain-medication/ https://naturaldrugsstoreonline.com/product-category/adhd/ https://naturaldrugsstoreonline.com/product-category/anti-anxiety/ https://naturaldrugsstoreonline.com/product-category/weight-loss/ https://naturaldrugsstoreonline.com/product-category/psychedelic/ https://naturaldrugsstoreonline.com/product-category/research-chemicals/ https://naturaldrugsstoreonline.com/product/fentanyl-powder/ https://naturaldrugsstoreonline.com/product/dmt/ https://naturaldrugsstoreonline.com/product/dmt-vape-pen/ https://naturaldrugsstoreonline.com/product/5-meo-dmt/ https://naturaldrugsstoreonline.com/product/reductil-15mg-sibutramine/ https://naturaldrugsstoreonline.com/product/phentermine-37-5mg-suprenza/ https://naturaldrugsstoreonline.com/product/valium-10mg-for-sale/ https://naturaldrugsstoreonline.com/product/xanax-3mg/ https://naturaldrugsstoreonline.com/product/modafinil-modalert-200mg/ https://naturaldrugsstoreonline.com/product/adderall/ https://naturaldrugsstoreonline.com/product/oxycodone-30mg/ https://naturaldrugsstoreonline.com/product/fentanyl-pills/
jnmedshouse22 · 63 weeks and 5 days ago
MAHJONGSLOT Sebagai Situs Slot Gacor Gampang Menang Dengan RTP Winrate Tertinggi 2023 Dengan panduan rtp yang asli dari pusat tentu membuat permainan semakin gacor dan memenangkan sensational maxwin dengan mudah.
missmawar222 · 52 weeks and 6 days ago
Legal Psilocybin Mushrooms For Sale Oregon Buy Mushroom Chocolate Bars Online in Oregon Mushroom Grow Kits For Sale Oregon Buy Mushroom Spores Online in Oregon Legal Psilocybin USA Micro Dosing Capsules For Sale In Oregon Medicinal Mushrooms for Sale Worldwide Shipping Buy Magic Truffles Online Shipping Oregon Legal Psilocybin Mushrooms For Sale Portland Oregon Legal Psilocybin Mushrooms For Sale Oregon https://legalpsilocybinusa.com/ https://legalpsilocybinusa.com/product-category/dried-magic-mushrooms/ https://legalpsilocybinusa.com/product-category/mushroom-spores/ https://legalpsilocybinusa.com/product-category/micro-dosing-capsules/ https://legalpsilocybinusa.com/product-category/medicinal-mushrooms/ https://legalpsilocybinusa.com/product-category/buy-magic-truffles-online-usa/ https://legalpsilocybinusa.com/product-category/magic-mushroom-edibles/ https://legalpsilocybinusa.com/product-category/grow-kits/ https://legalpsilocybinusa.com/product-tag/liberty-cap-mushroom-for-sale-online/ https://legalpsilocybinusa.com/product-tag/1-pound-of-dried-mushrooms/
mushroomgrow · 51 weeks and 1 day ago
Where To Buy Psilocybin Mushrooms Online In Portland Oregon buy mushrooms portland magic mushrooms portland oregon where can you buy mushrooms in oregon where can i buy psilocybin mushrooms where to buy psilocybin mushrooms https://oregonpsilocybinshop.com/ https://oregonpsilocybinshop.com/product-category/grow-kits/ https://oregonpsilocybinshop.com/product-category/magic-truffles/ https://oregonpsilocybinshop.com/product-category/shroom-spores/ https://oregonpsilocybinshop.com/product-category/shrooms-edibles/ https://oregonpsilocybinshop.com/product-category/magic-mushrooms/ https://oregonpsilocybinshop.com/product-category/microdose/
mushroomgrow · 46 weeks and 5 days ago
10 Situs Judi Online yang menawarkan beberapa permainan slot gampang menang dengan RTP tinggi , terbesar dan paling populer yang saat ini sudah banyak dikenal oleh para pemain. Pemain atau player tentunya akan disajikan oleh beberapa permainan yang memiliki tingkat kemenangan tinggi, dan beberapa pengembang permianan slot gacor tersebut antara lain : - TIMUR188 - SENSA838 - AJAKSLOT - MAXIM178 - WINWIN838 - ZOOM555 - SHIBATOTO - BOS717 - TOTOLOKA88 - KINGSAN168
missmawar222 · 25 weeks and 6 days ago
TIMUR188 Bukan hanya sekedar memberikan statement sebagai situs tergacor 2023 saat ini, kami membuktikan dengan memberikan jaminan garansi gacor 100% atau biasa di sebut garansi kekalahan 100%. Yang di mana apabila member baru deposit dan mengalami kekalahan pertamanya maka member berhak mengklaim garansi kekalahan 100% sesuai dengan syarat dan ketentuan yang berlaku. Menarik kan ? Main slot kalah dan bisa klaim kembali saldo nya. Promo ini hanya berlaku untuk member yang baru melakukan deposit untuk pertama kali nya. Cara klaim nya juga sangat mudah sekali. Member hanya perlu melapor ke CS Livechat TIMUR188 yang bertugas 24 jam dimana fitur klaim garansi nya terdapat di bagian pojok kanan bawah di halaman situs kami. Gabung sekarang juga jangan sampai ketinggalan promo bonus menarik yang sudah ditawarkan, segera klik langsung tombol yang disediakan diatas untuk bergabung dengan Situs TIMUR188 yang sudah kami Bagikan
wandasuwari · 22 weeks and 3 days ago

### What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

### What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

### Stay in the loop…

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: