hipporion/autoanswer_all.sh
2019-10-01 19:01:56 +02:00

15 lines
249 B
Bash
Executable file

#!/bin/bash
state="$1"
case $state in
1)
gr=enabled
;;
0)
gr=disabled
;;
esac
cd /opt/ksp
cat phones.txt | awk '{print $1}' | grep '^[3-5]' | xargs -i -n1 -P0 ./autoanswer_line.sh '{}' "$state" | grep $gr | cut -d. -f4| cut -d' ' -f1