#!/bin/sh
# http://www.berklix.com/~jhs/bin/.sh/telekom_bill_numbers_to_names
# ~jhs/bin/.sh/telekom_bill_numbers_to_names

# See Also ~/private/etc/pbx/estic-aliases.top

# For converting to names, the numbers in a telekom.de bill 
# of name format approx: 2018-09_evn_[0-9]+.pdf
# The numbers are first extracted from a .pdf using mouse copy to a file.
# Then run: cat moused_data | this_script

for i in `awk '{printf "%s\n",$4}'` ; do
	# echo NUMBER:	$i
	echo `grep $i /etc/pbx/aliases`
	done

# Later ideas to improve on
# awk '{bb=`grep $4 /etc/pbx/aliases`;printf "%s %s\n", $4, $bb}'
# awk '{b="whoami";printf "%s %s\n", $4, $b}'
