Index: trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinks
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinks	(revision 4082)
+++ trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinks	(revision 4082)
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# ========================================================================
+#
+# *
+# * This file is part of MARS, the MAGIC Analysis and Reconstruction
+# * Software. It is distributed to you in the hope that it can be a useful
+# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+# * It is distributed WITHOUT ANY WARRANTY.
+# *
+# * Permission to use, copy, modify and distribute this software and its
+# * documentation for any purpose is hereby granted without fee,
+# * provided that the above copyright notice appear in all copies and
+# * that both that copyright notice and this permission notice appear
+# * in supporting documentation. It is provided "as is" without express
+# * or implied warranty.
+# *
+#
+#
+#   Author(s): Martin Merck  05/2004 <mailto:merck@astro.uni-wuerzburg.de>
+#
+#   Copyright: MAGIC Software Development, 2000-2004
+#
+#
+# ========================================================================
+
+#/////////////////////////////////////////////////////////////////////////////
+#
+# mklinks
+#
+# This scripts creates in the local directors (directory where it is executed)
+# a series of subdirectories for each date in which links to the rawdata are created.
+# Normaly this script is used in a directory called rawdata2 to create links to
+# the rawdata files.
+# With a second script calle mklinksyy links to the ying-yang corrected files are
+# created and the corresponing links overwritten. In this way the subdirectory
+# rawdata2 will contain the correct links to the yy-files where necesary and the
+# original rawdata files, when no yy correction was necessary.
+#
+DATES=`ls -d -1 ../rawdata/20* | cut -d/ -f3 '-'`
+for DATE in $DATES
+do
+  OUTDIR=./$DATE
+  if [ ! -d $OUTDIR ]
+  then
+    echo $DATE
+    mkdir $OUTDIR
+  fi
+
+  cd $DATE
+  RAWFILES=`ls -1 ../../rawdata/$DATE/*.raw`
+  for i in $RAWFILES
+  do
+    ln -s $i `echo $i | cut -d/ -f5`
+  done
+  cd ..
+done
Index: trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinksyy
===================================================================
--- trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinksyy	(revision 4082)
+++ trunk/MagicSoft/Mars/mtemp/mwuerzburg/scripts/mklinksyy	(revision 4082)
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# ========================================================================
+#
+# *
+# * This file is part of MARS, the MAGIC Analysis and Reconstruction
+# * Software. It is distributed to you in the hope that it can be a useful
+# * and timesaving tool in analysing Data of imaging Cerenkov telescopes.
+# * It is distributed WITHOUT ANY WARRANTY.
+# *
+# * Permission to use, copy, modify and distribute this software and its
+# * documentation for any purpose is hereby granted without fee,
+# * provided that the above copyright notice appear in all copies and
+# * that both that copyright notice and this permission notice appear
+# * in supporting documentation. It is provided "as is" without express
+# * or implied warranty.
+# *
+#
+#
+#   Author(s): Martin Merck  05/2004 <mailto:merck@astro.uni-wuerzburg.de>
+#
+#   Copyright: MAGIC Software Development, 2000-2004
+#
+#
+# ========================================================================
+
+#/////////////////////////////////////////////////////////////////////////////
+#
+# mklinksyy
+#
+# This scripts creates in the local directors (directory where it is executed)
+# a series of subdirectories for each date in which links to the rawdata are created.
+# Normaly this script is used in a directory called rawdata2 to create links to
+# the ying-yang corrected rawdata files.
+# Already existing links are overwritten. Normally first the script mklinks should 
+# be executed and then this script to overwrite the links for the yy corected rawdata
+# files.
+#
+IN_DIR=/mcdata/yin_yang/Period015/rawdata
+DATES=`ls -d -1 $IN_DIR/20* | cut -d/ -f6 '-'`
+for DATE in $DATES
+do
+  OUTDIR=./$DATE
+  if [ ! -d $OUTDIR ]
+  then
+    echo $DATE
+    mkdir $OUTDIR
+  fi
+
+  cd $DATE
+  RAWFILES=`ls -1 $IN_DIR/$DATE/*.raw`
+  for i in $RAWFILES
+  do
+    ln -f -s $i `echo $i | cut -d/ -f7`
+  done
+  cd ..
+done
