From 1aa3ee94cc0574f6068a7882631a3a87e49aedf6 Mon Sep 17 00:00:00 2001 From: KM4ACK Date: Sat, 6 Aug 2022 10:56:37 -0500 Subject: [PATCH] initial commit --- sms/remove-carrier | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 sms/remove-carrier diff --git a/sms/remove-carrier b/sms/remove-carrier new file mode 100755 index 0000000..91f794d --- /dev/null +++ b/sms/remove-carrier @@ -0,0 +1,29 @@ +#!/bin/bash + +#script to remove phone carries to master list +#KM4ACK 02AUGUST2022 + +FILE=$HOME/patmenu2/sms/myphonelist.txt +MYTEMP=/run/user/$UID/templist.txt +MAIN=$HOME/patmenu2/sms/manage-sms + +INFO=$(PARSER='OFS="\n" {print $1}' + +tail -300 $FILE | awk "$PARSER" | \ +yad --title="Search Results" --width=1100 --height=500 \ + --image $LOGO --window-icon=$LOGO --image-on-top --multiple \ + --center --list --text="Current Carrier List" \ + --column Carrier \ + --button=gtk-close \ + --button="Remove Carrier":2 > $MYTEMP) +BUT=$? +sed -i 's/|//g' $MYTEMP + +while read -r line; do + sed -i "/$line/d" $FILE +done < $MYTEMP + +yad --center --timeout=3 --timeout-indicator=top --no-buttons --text="The carrier list has been updated" + +$MAIN & +exit \ No newline at end of file