Type in a command, or "ls dictionary" to search all commands for "dictionary", etc.

gccd

switch %s | afghanistan => af, algeria => dz, american samoa => as, andorra => ad, angola => co.ao, anguilla => com.ai, antigua and barbuda => ag, argentina => com.ar, armenia => am, australia => com.au, austria => at, azerbaijan => az, bahamas => bs, bahrain => com.bh, bangladesh => com.bd, belarus => com.by, belgium => be, belize => com.bz, benin => bj, bolivia => bo, bosnia and herzegovina => ba, botswana => co.bw, brazil => com.br, brunei darussalam => com.bn, bulgaria => bg, burkina faso => bf, burundi => bi, cambodia => com.kh, cameroon => cm, canada => ca, central african republic => cf, chile => cl, china => cn, colombia => com.co, congo => cg, congo democratic republic => cd, cook islands => co.ck, costa rica => co.cr, côte d' ivoire => ci, croatia => hr, cuba => com.cu, cyprus => com.cy, czech republic => cz, denmark => dk, djibouti => dj, dominica => dm, dominican republic => com.do, ecuador => ec, egypt => com.eg, salvador => com.sv, estonia => ee, ethiopia => com.et, fiji => com.fj, finland => fi, france => fr, french guiana => gf, gabon => ga, gambia => gm, georgia => ge, germany => de, ghana => com.gh, gibraltar => com.gi, greece => gr, greenland => gl, grenada => gd, guadeloupe => gp, guatemala => com.gt, guernsey => gg, guyana => gy, haiti => ht, heard island and mcdonald islands => hm, honduras => hn, hong kong => hk, hungary => hu, iceland => is, india => in, indonesia => co.id, ireland => ie, isle of man => im, israel => co.il, italy => it, jamaica => com.jm, japan => jp, jersey => je, jordan => jo, kazakhstan => kz, kenya => co.ke, kiribati => ki, south korea => kr, kuwait => com.kw, kyrgyzstan => kg, laos => la, latvia => lv, lebanon => com.lb, libya => com.ly, liechtenstein => li, lithuania => lt, luxembourg => lu, macedonia => mk, madagascar => mg, malawi => mw, malaysia => com.my, maldives => mv, mali => ml, malta => com.mt, mauritius => mu, mexico => com.mx, micronesia => fm, moldova => md, mongolia => mn, montenegro => me, montserrat => ms, morocco => ma, mozambique => co.mz, namibia => com.na, nauru => nr, nepal => com.np, netherlands => nl, new zealand => co.nz, nicaragua => com.ni, niger => ne, nigeria => com.ng, niue => nu, norfolk island => nf, norway => no, oman => com.om, pakistan => pk, palestinian territory => ps, panama => com.pa, paraguay => com.py, peru => com.pe, philippines => ph, pitcairn => pn, poland => pl, portugal => pt, puerto rico => pr, qatar => com.qa, réunion => re, romania => ro, russia => ru, rwanda => rw, saint helena => sh, saint lucia => com.lc, saint vincent and the grenadines => vc, samoa => ws, san marino => sm, sao tome and principe => st, saudi arabia => com.sa, senegal => sn, serbia => rs, seychelles => sc, sierra leone => sl, singapore => sg, slovakia => sk, slovenia => si, solomon islands => com.sb, south africa => co.za, south georgia and the south sandwich islands => gs, spain => es, sri lanka => lk, suriname => sr, sweden => se, switzerland => ch, taiwan => tw, tajikistan => com.tj, tanzania => co.tz, thailand => co.th, timor-leste => tl, togo => tg, tokelau => tk, tonga => to, trinidad and tobago => tt, tunisia => com.tn, turkey => com.tr, turkmenistan => tm, tuvalu => tv, uganda => ug, ukraine => com.ua, united arab emirates => ae, united kingdom => co.uk, united states => us, uruguay => com.uy, uzbekistan => uz, vanuatu => vu, venezuela => co.ve, vietnam => vn, virgin islands british => vg, virgin islands u.s. => co.vi, zambia => co.zm, zimbabwe => co.zw, * => com
NAME

gccd - google country code domain

SYNOPSIS

gccd [country] - returns the country code domain used in the google site for that country.

DESCRIPTION

I'm making this command for a command I'm making named ugsrch (universal google search. If ugs or gsrch are available I will one of those), in which you can specify the country and the language for your search.

I found that in google (maybe in other sites too) the country code domains do not always correspond to the iso country codes.
for example, if you type www.google.fr, you will be redirected to google France. But for other countries, like Latin American or Asian countries,
the google site will be either www.google.com."isocountrycode" or www.google.co."isocountrycode". Sometimes if you put the iso code, google will automatically 
make the change, like when you type www.google.jp, you will be redirected to www.google.co.jp. But sometimes this does not happen. That's wy I need this command.

So this command will let you retrieve the google country code domain if you type the country name (in English).

SYNTAX
gccd "country"


EXAMPLE
gccd argentina -> com.ar
gccd angola -> co.ao
gccd france -> fr

AUTHOR

Luis Gabriel Matallana Vallejo <luisgmatallana@gmail.com>


 
    
62 uses - Created 2010-05-29 16:08:22 - Last used 2016-07-25 03:55:34
Is this command broken? Tell Jon if you know how to fix it.
Do you find this command offensive? Let Jon know.