Skip to content

Commit

Permalink
Fixed syntax errors that broke the -H option
Browse files Browse the repository at this point in the history
  • Loading branch information
spenc333 committed Mar 2, 2022
1 parent df4ac3d commit 6106469
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions scripts/camViewer
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ tmp=/tmp/cv.$$
cat "$VIEWERCFG" | grep -i "$NAME" | grep -v '#' | awk -F, '{ if (split($2,a,";")==1) n=$2; else n=a[2]; gsub(" ","",n); gsub(" ","",$4); printf "%s %s\n", n, $4; }' >$tmp
c=$(wc -l <$tmp)
if [ "$c" -eq 0 ]; then
VIEWERCFG='/reg/g/pcds/pyps/config/*/camviewer.cfg'
cat "$VIEWERCFG" | grep -i "$NAME" | grep -v '#' | awk -F, '{ if (split($2,a,";")==1) n=$2; else n=a[2]; gsub(" ","",n); gsub(" ","",$4); printf "%s %s\n", n, $4; }' >$tmp
VIEWERCFG=/reg/g/pcds/pyps/config/*/camviewer.cfg
cat $VIEWERCFG | grep -i "$NAME" | grep -v '#' | awk -F, '{ if (split($2,a,";")==1) n=$2; else n=a[2]; gsub(" ","",n); gsub(" ","",$4); printf "%s %s\n", n, $4; }' >$tmp
c=$(wc -l <$tmp)
if [ "$c" -eq 0 ]; then
echo "No match for $1"
Expand Down Expand Up @@ -104,14 +104,14 @@ HUTCH=$(echo "$1" | tr a-z A-Z)
hutch=$(echo "$1" | tr A-Z a-z)

ALLVIEWERCFG=/reg/g/pcds/pyps/config/*/camviewer.cfg
echo cat "$ALLVIEWERCFG" | grep -v '#' | awk -F, '{ if (split($2,a,";")==1) n=$2; else n=a[2]; gsub(" ","",n); gsub(" ","",$4); printf "%s %s\n", n, $4; }'
echo cat $ALLVIEWERCFG | grep -v '#' | awk -F, '{ if (split($2,a,";")==1) n=$2; else n=a[2]; gsub(" ","",n); gsub(" ","",$4); printf "%s %s\n", n, $4; }'

VIEWERCFGLFE=/reg/g/pcds/pyps/config/lfe/camviewer.cfg
VIEWERCFG=/reg/g/pcds/pyps/config/$hutch/camviewer.cfg
VIEWERCFGXRT=/reg/g/pcds/pyps/config/xrt/camviewer.cfg

if [ "$hutch" != 'tmo' ] && [ "$hutch" != 'rix' ]; then
for gige_cam in $(grep -v '#' $VIEWERCFGLFE | awk -F, '{print $4 "\n" '); do
for gige_cam in $(grep -v '#' $VIEWERCFGLFE | awk -F, '{print $4 "\n"} '); do
echo "$gige_cam"
done

Expand Down Expand Up @@ -167,7 +167,7 @@ fi

LIST=0
CAMNUM=0
CAMNAME=0
CAM=0
WAIT=0
RATE=-1
REBOOT=0
Expand Down

0 comments on commit 6106469

Please sign in to comment.