#!/bin/csh

#
#	Process satellite data.  Separate out different unit type, optionally
#	selecting for a specific country number
#

set file=${argv[1]}
set coun=${argv[2]}

echo "=== Land units ==="
egrep "^  $coun  [0-9]* [a-z0-9]* [a-z0-9]* [a-z0-9]* {1,15} -*[0-9]*,-*[0-9]* +[0-9]+%" $file | sort | uniq

echo
echo "=== Ships ==="
egrep "^ +$coun +[0-9]* [a-z0-9]* [a-z0-9]* [a-z0-9]* {20,} -*[0-9]*,-*[0-9]* +[0-9]+%" $file | sort | uniq


