From 32bed38991c38b9718cd6b50717f04b84c2181a2 Mon Sep 17 00:00:00 2001 From: luedeke Date: Mon, 18 May 2009 11:39:07 +0000 Subject: [PATCH] script to expand subs files and print record names --- G_EPICS_subs2rec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 G_EPICS_subs2rec diff --git a/G_EPICS_subs2rec b/G_EPICS_subs2rec new file mode 100755 index 0000000..a365520 --- /dev/null +++ b/G_EPICS_subs2rec @@ -0,0 +1,17 @@ +#!/bin/sh +if [ "$1" = "-v" ] ;then echo "\$Header: /cvs/G/EPICS/App/scripts/G_EPICS_subs2rec,v 1.1 2009/05/18 11:39:07 luedeke Exp $";exit;fi +if [ "$1" = "-?" ] ;then + echo "using: $0 [ [...]]" + echo "expands EPICS substitution files and prints record names" + exit +fi +for file in "$@" +do + dbLoadTemplate $file|\ + awk '/record[ \t]*[(]/{ + sub("[^,]*,","") + sub("[)].*$","") + gsub("\"","") + print $0 + }' +done