Index: /trunk/Mars/hawc/processing/extract-aux-data.sh
===================================================================
--- /trunk/Mars/hawc/processing/extract-aux-data.sh	(revision 20032)
+++ /trunk/Mars/hawc/processing/extract-aux-data.sh	(revision 20033)
@@ -1,3 +1,6 @@
 #!/bin/bash
+
+# File containing the access credentials for the database
+CREDENTIALS=credentials-read-only.cnf
 
 # Specify the telescope for which to run the script. Replace '1' 
@@ -73,20 +76,16 @@
 "\
  |  mysql \
-       --defaults-file=~/.password.cnf \
-       --user=hawcwrite \
-       --host=ihp-pc45.ethz.ch \
-       --database=hawcdata \
+       --defaults-file=${CREDENTIALS} \
        --skip-column-names \
        --batch --raw \
        --compress \
  | \
-while IFS= read -r LINE
+while read -r -a LINE
 do
-
   # Extract night, runid, begin and end
-  NIGHT=`echo "$LINE" | awk -F"\t" '{print $1}'`
-  RUNID=`echo "$LINE" | awk -F"\t" '{print $2}'`
-  BEG=`echo   "$LINE" | awk -F"\t" '{print $3}'`
-  END=`echo   "$LINE" | awk -F"\t" '{print $4}'`
+  NIGHT=${LINE[0]}
+  RUNID=${LINE[1]}
+  BEG=${LINE[2]}
+  END=${LINE[3]}
 
   # Split night into year, month, day
Index: /trunk/Mars/hawc/processing/extract-raw-headers.sh
===================================================================
--- /trunk/Mars/hawc/processing/extract-raw-headers.sh	(revision 20032)
+++ /trunk/Mars/hawc/processing/extract-raw-headers.sh	(revision 20033)
@@ -64,7 +64,7 @@
 
    # Extract year, month and day from directory name 
-   YEAR=`echo ${SUBDIR} | cut -f6 -d\/`
+   YEAR=`echo  ${SUBDIR} | cut -f6 -d\/`
    MONTH=`echo ${SUBDIR} | cut -f7 -d\/`
-   DAY=`echo ${SUBDIR} | cut -f8 -d\/`
+   DAY=`echo   ${SUBDIR} | cut -f8 -d\/`
 
    # Loop over all files in this subdirectory
Index: /trunk/Mars/hawc/processing/run-callisto.sh
===================================================================
--- /trunk/Mars/hawc/processing/run-callisto.sh	(revision 20032)
+++ /trunk/Mars/hawc/processing/run-callisto.sh	(revision 20033)
@@ -1,3 +1,6 @@
 #!/bin/bash
+
+# File containing the access credentials for the database
+CREDENTIALS=credentials-read-only.cnf
 
 # Specify the telescope for which to run the script. Replace '1' 
@@ -30,20 +33,16 @@
 "\
  |  mysql \
-       --defaults-file=~/.password.cnf \
-       --user=hawcwrite \
-       --host=ihp-pc45.ethz.ch \
-       --database=hawcdata \
+       --defaults-file=${CREDENTIALS} \
        --skip-column-names \
        --batch --raw \
        --compress \
  | \
-while IFS= read -r LINE
+while read -r -a LINE
 do
-
   # Extract night/runid for data file and calibration file
-  DATNIGHT=`echo "$LINE" | awk -F"\t" '{print $1}'`
-  DATRUNID=`echo "$LINE" | awk -F"\t" '{print $2}'`
-  DRSNIGHT=`echo "$LINE" | awk -F"\t" '{print $3}'`
-  DRSRUNID=`echo "$LINE" | awk -F"\t" '{print $4}'`
+  DATNIGHT=${LINE[0]}
+  DATRUNID=${LINE[1]}
+  DRSNIGHT=${LINE[2]}
+  DRSRUNID=${LINE[3]}
 
   # Split both into year, month, day
Index: /trunk/Mars/hawc/processing/run-root2sql.sh
===================================================================
--- /trunk/Mars/hawc/processing/run-root2sql.sh	(revision 20032)
+++ /trunk/Mars/hawc/processing/run-root2sql.sh	(revision 20033)
@@ -1,3 +1,6 @@
 #/bin/bash
+
+# File containing the access credentials for the database
+CREDENTIALS=credentials-read-only.cnf
 
 # Specify the telescope for which to run the script. Replace '1' 
@@ -30,18 +33,14 @@
 "\
  |  mysql \
-       --defaults-file=~/.password.cnf \
-       --user=hawcwrite \
-       --host=ihp-pc45.ethz.ch \
-       --database=hawcdata \
+       --defaults-file=${CREDENTIALS} \
        --skip-column-names \
        --batch --raw \
        --compress \
  | \
-while IFS= read -r LINE
+while read -r -a LINE
 do
-
   # Get NIGHT and RUNID of all files
-  NIGHT=`echo "$LINE" | awk -F"\t" '{print $1}'`
-  RUNID=`echo "$LINE" | awk -F"\t" '{print $2}'`
+  NIGHT=${LINE[0]}
+  RUNID=${LINE[1]}
 
   # Split into year, month, day
Index: /trunk/Mars/hawc/processing/run-star.sh
===================================================================
--- /trunk/Mars/hawc/processing/run-star.sh	(revision 20032)
+++ /trunk/Mars/hawc/processing/run-star.sh	(revision 20033)
@@ -1,4 +1,6 @@
 #!/bin/bash
 
+# File containing the access credentials for the database
+CREDENTIALS=credentials-read-only.cnf
 
 # Specify the telescope for which to run the script. Replace '1' 
@@ -31,17 +33,14 @@
 "\
  |  mysql \
-       --defaults-file=/home/tbretz/data/.password.cnf \
-       --user=iceactwrite \
-       --host=ihp-pc45.ethz.ch \
-       --database=iceactdata \
+       --defaults-file=${CREDENTIALS} \
        --skip-column-names \
        --batch --raw \
        --compress \
  | \
-while IFS= read -r LINE
+while read -r -a LINE
 do
   # Get NIGHT and RUNID of all files
-  NIGHT=`echo "$LINE" | awk -F"\t" '{print $1}'`
-  RUNID=`echo "$LINE" | awk -F"\t" '{print $2}'`
+  NIGHT=${LINE[0]}
+  RUNID=${LINE[1]}
 
   # Split into year, month, day
