~~NOTOC~~ ====== Quick Offline Ham Search ====== On my linux computer, I keep a ''csv'' file of the ISED ham database for when I need to quickly look up someone. Here are a few tricks to make the process really quick. ===== Setup ===== Instead of using my browser to download the file from ISED (http://apc-cap.ic.gc.ca/datafiles/amateur_delim.zip), I run this script, which: - Downloads the ''zip'' file to my ''~/Ham'' folder - Renames the file I want to ''csv'' - Deletes all the files I don't want #!/bin/bash DIR=$HOME"/Ham" echo "Downloading Amateur Archive from ISED website:" wget --report-speed=bits http://apc-cap.ic.gc.ca/datafiles/amateur_delim.zip -P $DIR echo echo "Unzipping archive:" cd $DIR unzip amateur_delim.zip echo "Renaming amateur_delim.txt to amateur_delim.csv" mv amateur_delim.txt amateur_delim.csv chmod 644 amateur_delim.csv echo "Deleting amateur_delim.zip, lisezmoi_amat_delim.txt, and readme_amat_delim.txt" rm amateur_delim.zip lisezmoi_amat_delim.txt readme_amat_delim.txt echo echo echo "Done. Note that the customer separator is: ;" echo To look up the file, I added this line to my ''alias'': alias hamsearch='cat /home/ptruchon/Ham/amateur_delim.csv |grep -i ' ===== Usage ===== To update my local file, I only have to type this into the terminal: ised.sh To look up something, I only have to type this into the terminal hamsearch [Search Term] ==== Examples ==== You can search for a callsign: hamsearch ve7aaa VE7AAA;Arthur Ellwood;Abrahamson;760 OXFORD PLACE;CAMPBELL RIVER;BC;V9W7Y7;A;;C;D;;;;;;; Or search for any strings in that file. Use '' if there's more than one word. hamsearch 'vancouver general' VA7LGH;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7PRH;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7RHS;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7SGH;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7SMH;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7VCH;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7VCS;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 VA7VGH;Ernest;Mix;436 CARDIFF WAY;PORT MOODY;BC;V3H3T1;A;B;;D;;Vancouver Coastal Health Amateur Radio Group;c/o VCH Emergency Management - Vancouver General Hospital;855 West 12th Avenue, JPPS1, Room 1769;VANCOUVER;BC;V5Z1M9 ~~DISCUSSION~~