utils: local functions improvements
This commit is contained in:
parent
e4c3b08e18
commit
2450b211e2
1 changed files with 11 additions and 3 deletions
|
@ -18,7 +18,7 @@ chans () {
|
||||||
_output=`fs_cli -x 'show channels as delim |' | csvcut -d\| -c 3,2,6,8,10,11,13,15,18 | csvlook -I`
|
_output=`fs_cli -x 'show channels as delim |' | csvcut -d\| -c 3,2,6,8,10,11,13,15,18 | csvlook -I`
|
||||||
clear
|
clear
|
||||||
echo "$_output"
|
echo "$_output"
|
||||||
sleep 0.5
|
sleep 1
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ hlr() {
|
||||||
}
|
}
|
||||||
|
|
||||||
rk_ext() {
|
rk_ext() {
|
||||||
IMSI=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/index/msisdn_bin/$1 2>/dev/null| sed -e 's/[^0-9]//g')
|
IMSI=$(curl -X GET http://10.23.0.3:8098/buckets/hlr/index/msisdn_bin/$1 2>/dev/null| python -c "import sys, json; print json.load(sys.stdin)['keys'][0]")
|
||||||
echo $IMSI
|
echo $IMSI
|
||||||
rk_imsi $IMSI
|
rk_imsi $IMSI
|
||||||
}
|
}
|
||||||
|
@ -58,5 +58,13 @@ rk_imsi() {
|
||||||
}
|
}
|
||||||
|
|
||||||
tl() {
|
tl() {
|
||||||
tail -f /var/log/rccn/*log
|
if [ "$1" == "" ] ; then
|
||||||
|
less -RS +F /var/log/rccn/*log
|
||||||
|
else
|
||||||
|
less -RS +F /var/log/rccn/$1.log
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
r() {
|
||||||
|
sudo -i bash -c "cd /var/rhizomatica/rccn; exec bash --login"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue