-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlookup.sh
More file actions
executable file
·43 lines (31 loc) · 995 Bytes
/
lookup.sh
File metadata and controls
executable file
·43 lines (31 loc) · 995 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
#########################################################################
# User Data Lookup Utility #
# This Script will set the user lookup to either #
# QRZ or RadioID #
# #
# VE3RD 2021-02-07 #
###########################################################333###########
export NCURSES_NO_UTF8_ACS=1
#declare -i slen
if [ "$1" ]; then
char="$1"
char=${char^^}
key=${char:0:1}
else
key="Q"
fi
#echo "$key"
fn=/etc/pistar-css.ini
sudo mount -o remount,rw /
serv="QRZ"
if [ "$key" == "Q" ]; then
serv="QRZ"
fi
if [ "$key" == "R" ]; then
serv="RadioID"
fi
echo "$serv"
# /etc/pistar-css.ini:Service=QRZ
sudo sed -i '/^\[/h;G;/Lookup/s/\(Service=\).*/\1'"$serv"'/m;P;d' /etc/pistar-css.ini
sudo mount -o remount,ro /