mirror of
https://github.com/sdr-enthusiasts/docker-planefence.git
synced 2025-12-22 11:17:06 +00:00
clean up non-alphanumeric characters in airlinename lookup
This commit is contained in:
@@ -183,6 +183,7 @@ if [[ -n "$b" ]] && [[ "$q" == "" ]]; then q="rdb"; fi
|
||||
# Clean up the results
|
||||
if [[ -n "$b" ]]; then
|
||||
b="${b^^}"
|
||||
b="${b//[^[:alnum:] ]/}" # cleanup any non alphanumeric characters
|
||||
b="$(echo "$b"|xargs)" #clean up extra spaces
|
||||
b="${b% [A-Z0-9]}" #clean up single letters/numbers at the end, so "KENNEDY JOHN F" becomes "KENNEDY JOHN"
|
||||
b="${b% DBA}" #clean up some undesired suffices, mostly corporate entity names
|
||||
@@ -191,7 +192,7 @@ if [[ -n "$b" ]]; then
|
||||
b="${b% INC}"
|
||||
b="${b% LTD}"
|
||||
b="${b% PTY}"
|
||||
b="${b% \& CO KG}"
|
||||
b="${b% CO KG}"
|
||||
b="${b% AG}"
|
||||
b="${b% AB}"
|
||||
b="${b% VOF}"
|
||||
|
||||
Reference in New Issue
Block a user