source: SH_SHM/trunk/source/gcf/gfdlist.csh @ 358

Revision 16, 919 bytes checked in by marcus, 14 years ago (diff)

r1 | svn | 2007-12-13 11:10:29 +0100 (Do, 13 Dez 2007) | 2 lines

Initial import

  • Property svn:executable set to *
Line 
1#! /bin/csh
2#
3# file gfdlist.csh
4#      ===========
5#
6# version 1, 20-Oct-2003
7#
8# creates gfd file using gfdline
9# K. Stammler, 20-Oct-2003
10
11set rootdir='.'
12set wildcard=\*
13set outfile="sfdfile.sfd"
14set reclth=""
15
16#set echo
17
18if  ("$1" == "-h")  then
19        echo "Usage: $0 [<wild>] [<rootpath>] [<outfile>] [<quiet>] [<reclth>]"
20        exit
21endif
22
23if  ("$1" != "")  set wildcard="$1"
24if  ("$2" != "")  set rootdir="$2"
25if  ("$3" != "")  set outfile="$3"
26set quiet="$4"
27if  ("$5" != "")  set reclth="$5"
28
29set scrfile=$outfile.x.$$
30
31set flist=`find $rootdir -name "$wildcard" -type f -print`
32
33if  ("$reclth" == "")  then
34        set q1=""
35else
36        set q1="-gcfrec=$reclth"
37endif
38
39if  (-e $scrfile)  \rm $scrfile
40touch $scrfile
41foreach i ($flist)
42        if  (! -z $i)  then
43                if  ("$4" != "quiet")  echo "processing file $i"
44                $SH_SOURCE/gcf/gfdline $q1 $i >>$scrfile
45        endif
46end
47
48if  (-e $outfile)  \rm $outfile
49sort $scrfile >$outfile
50\rm $scrfile
Note: See TracBrowser for help on using the repository browser.