Jpp  master_rocky-37-gf0c5bc59d
the software that should make you happy
JPrintHeaderFromFilelist.sh
Go to the documentation of this file.
1 #!/bin/zsh
2 #
3 # \author mdejong
4 #
5 script=${0##*/}
6 
7 # ------------------------------------------------------------------------------------------
8 #
9 # Auxiliary script to print Monte Carlo header.
10 #
11 # ------------------------------------------------------------------------------------------
12 
13 if [ -z $JPP_DIR ]; then
14  echo "Variable JPP_DIR undefined."
15  exit
16 fi
17 
18 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/null
19 
20 set_variable WORKDIR ${TMPDIR:-/tmp}/
21 
22 if do_usage $*; then
23  usage "$script <input file>"
24 fi
25 
26 if (( $# != 1 )); then
27  fatal "Wrong number of arguments."
28 fi
29 
30 set_variable INPUT_FILE $1
31 
32 if [[ ${INPUT_FILE##*.} == "files" ]]; then
33  JPrintHeader -f ${INPUT_FILE}
34 else
35  JPrintHeader -f "`cat ${INPUT_FILE}`"
36 fi