source: trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinks@ 4082

Last change on this file since 4082 was 4082, checked in by merck, 21 years ago
*** empty log message ***
  • Property svn:executable set to *
File size: 1.9 KB
Line 
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# mklinks
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 rawdata files.
35# With a second script calle mklinksyy links to the ying-yang corrected files are
36# created and the corresponing links overwritten. In this way the subdirectory
37# rawdata2 will contain the correct links to the yy-files where necesary and the
38# original rawdata files, when no yy correction was necessary.
39#
40DATES=`ls -d -1 ../rawdata/20* | cut -d/ -f3 '-'`
41for DATE in $DATES
42do
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 ../../rawdata/$DATE/*.raw`
52 for i in $RAWFILES
53 do
54 ln -s $i `echo $i | cut -d/ -f5`
55 done
56 cd ..
57done
Note: See TracBrowser for help on using the repository browser.