Changeset 42441 for trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh
- Timestamp:
- Apr 4, 2023, 8:18:25 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/eam/rawfix.20230221/src/get_hosts_md5s.sh
r42430 r42441 1 1 #!/bin/csh 2 2 3 if ($#argv != 2) then4 echo "USAGE: get_hosts_md5s.sh ( dateobs) (stage)"3 if ($#argv != 3) then 4 echo "USAGE: get_hosts_md5s.sh (topdir) (dateobs) (stage)" 5 5 exit 2 6 6 endif 7 7 8 set dirname = $1 9 set stage = $2 8 set topdir = $1 9 set dateobs = $2 10 set stage = $3 10 11 11 if (! -d $dirname) then 12 echo "ERROR: missing dateobs directory $dirname" 12 if (! -d $topdir) then 13 echo "ERROR: missing top-level directory $topdir" 14 exit 3 15 endif 16 17 if (! -d $topdir/$dateobs) then 18 echo "ERROR: missing dateobs directory $topdir/$dateobs" 13 19 exit 3 14 20 endif 15 21 16 22 # report both the dateobs and the hostnames 17 ls $ dirname/*.inst.$stage.txt | awk -v dateobs=$dirname -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $2}' | sed s/.inst.$stage.txt//23 ls $topdir/$dateobs/*.inst.$stage.txt | awk -v dateobs=$dateobs -F/ '(NR == 1){print "dateobs md5host"}{print dateobs, $NF}' | sed s/.inst.$stage.txt// 18 24 exit 0
Note:
See TracChangeset
for help on using the changeset viewer.
