Talk:Active troops per thousand citizens
From Wikipedia, the free encyclopedia
If anyone cares (to update this page when the parent page has been updated), I used a unix bash shell 'script' (series of pipes on the cmd line) to make the list. Watch out for the special characters getting mangled by your particular locale (Cote D'Ivoire for eg).
Save the edit version of the parent page to troops.html and edit out everything on the page except the form area data that's the meat of the table (remove table headers and footers, of course). Then run:
sed 's/^|-$/~/' troops.html | tr -d "\n" | tr "~" "\n" | rev | sed 's/|/~/' | rev | sort -t \~ +1.0nr | tr "~" "|" | while read a; do i=$[ $i+1 ] ; echo -e "|$i|$a\n|-"; done > troops.sorted
and cutnpaste back into wikipedia. (Yeah its a hack.).
-- KenChasse
[edit] New Zealand
I might be working this out wrong but New Zealands value seems far lower than it should be. 0.47 * 4143 (the number of thousands of people) gives a total military of 1947 active troops.
[edit] Switzerland
The Swiss are way out of order on the page. I don't have the courage to try Ken's suggestion.--SVTCobra 22:20, 5 October 2006 (UTC)
- Fixed it. Couldn't get Ken's code to work on my Mac, so re-ordered it by hand. --sony-youth 14:01, 12 November 2006 (UTC)
[edit] Page inaccurate
I noticed that parts of this page are inaccurate. The ranking for Switzerland & persons per thousand are completely wrong. XB-70 06:59, 5 October 2007 (UTC)