From 885c60f3586f00f7663b69d6e1a56beb9e844d56 Mon Sep 17 00:00:00 2001 From: Keith Date: Tue, 4 Sep 2018 20:33:44 +0200 Subject: [PATCH] RCCN shell functions, fixup chans() display There can be commas in some field data output by fs show channels, so pass the output through sed to strip that and prepare for csvcut. --- modules/rhizo_base/templates/rccn-functions.sh.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/rhizo_base/templates/rccn-functions.sh.erb b/modules/rhizo_base/templates/rccn-functions.sh.erb index 19abd39..78f6a40 100644 --- a/modules/rhizo_base/templates/rccn-functions.sh.erb +++ b/modules/rhizo_base/templates/rccn-functions.sh.erb @@ -15,7 +15,7 @@ waitfor0calls () { chans () { while [ 1 == 1 ] do - _output=`fs_cli -x 'show channels' | csvcut -c 3,2,6,8,10,11,13,15,18 | csvlook -I` + _output=`fs_cli -x 'show channels' | head -n -3 | sed -E 's/\{([^,]*),([^}]*)}/{\1\2}/' | csvcut -c 3,2,6,8,10,11,13,15,18 | csvlook -I` clear echo "$_output" sleep 1