1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # ========================================================================
|
---|
4 | #
|
---|
5 | # *
|
---|
6 | # * This file is part of MARS, the MAGIC Analysis and Reconstruction
|
---|
7 | # * Software. It is distributed to you in the hope that it can be a useful
|
---|
8 | # * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
|
---|
9 | # * It is distributed WITHOUT ANY WARRANTY.
|
---|
10 | # *
|
---|
11 | # * Permission to use, copy, modify and distribute this software and its
|
---|
12 | # * documentation for any purpose is hereby granted without fee,
|
---|
13 | # * provided that the above copyright notice appear in all copies and
|
---|
14 | # * that both that copyright notice and this permission notice appear
|
---|
15 | # * in supporting documentation. It is provided "as is" without express
|
---|
16 | # * or implied warranty.
|
---|
17 | # *
|
---|
18 | #
|
---|
19 | #
|
---|
20 | # Author(s): Martin Merck 05/2004 <mailto:merck@astro.uni-wuerzburg.de>
|
---|
21 | #
|
---|
22 | # Copyright: MAGIC Software Development, 2000-2004
|
---|
23 | #
|
---|
24 | #
|
---|
25 | # ========================================================================
|
---|
26 |
|
---|
27 | #/////////////////////////////////////////////////////////////////////////////
|
---|
28 | #
|
---|
29 | # mklinksyy
|
---|
30 | #
|
---|
31 | # This scripts creates in the local directors (directory where it is executed)
|
---|
32 | # a series of subdirectories for each date in which links to the rawdata are created.
|
---|
33 | # Normaly this script is used in a directory called rawdata2 to create links to
|
---|
34 | # the ying-yang corrected rawdata files.
|
---|
35 | # Already existing links are overwritten. Normally first the script mklinks should
|
---|
36 | # be executed and then this script to overwrite the links for the yy corected rawdata
|
---|
37 | # files.
|
---|
38 | #
|
---|
39 | IN_DIR=/mcdata/yin_yang/Period015/rawdata
|
---|
40 | DATES=`ls -d -1 $IN_DIR/20* | cut -d/ -f6 '-'`
|
---|
41 | for DATE in $DATES
|
---|
42 | do
|
---|
43 | OUTDIR=./$DATE
|
---|
44 | if [ ! -d $OUTDIR ]
|
---|
45 | then
|
---|
46 | echo $DATE
|
---|
47 | mkdir $OUTDIR
|
---|
48 | fi
|
---|
49 |
|
---|
50 | cd $DATE
|
---|
51 | RAWFILES=`ls -1 $IN_DIR/$DATE/*.raw`
|
---|
52 | for i in $RAWFILES
|
---|
53 | do
|
---|
54 | ln -f -s $i `echo $i | cut -d/ -f7`
|
---|
55 | done
|
---|
56 | cd ..
|
---|
57 | done
|
---|