Skip to content

Instantly share code, notes, and snippets.

@mvasilkov
Created February 7, 2013 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mvasilkov/4733542 to your computer and use it in GitHub Desktop.
Save mvasilkov/4733542 to your computer and use it in GitHub Desktop.
./comment.sh baka.conf sendsms-user
group = core
admin-port =
admin-password =
log-file = "/var/log/kannel/bearerbox.log"
log-level = 3
status-password =
access-log = "/var/log/kannel/access_kannel.log"
store-location = "/var/log/kannel/store_sms"
smsbox-port =
# dlr-storage = mysql
sms-resend-retry = 1
group = sendsms-user
username =
password =
concatenation = true
max-messages = 20
default-smsc = plastic
group = sendsms-baka
username =
password =
concatenation = true
max-messages = 20
default-smsc = smarts2
всё = тлен
смерть = неизбежна
#!/bin/bash
if [ -z "$1" ] || [ -z "$2" ]
then
echo "Usage: $0 {filename} {group-name}"
exit
fi
if [ ! -f "$1" ]
then
echo "$1: file not found, or not a file"
exit
fi
LOLI_HATE=
while read -r PIZZA
do
if [[ "$PIZZA" == group*"$2" ]]
then
LOLI_HATE="# "
fi
echo "$LOLI_HATE$PIZZA"
if [[ "$PIZZA" == default-smsc* ]]
then
LOLI_HATE=
fi
done < "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment