I have some JobStreams which have some Jobs in it.
I intend to create a config file to be used generic for any Jobstream and another config file to be used by each Job.So I would have many job_config_files and only one generic_config_file
My question, is, can I create a config file as source by another? for example:
Job_config_file
export NAME_JOB='PP_AAAR'
export log_dir="/data/workdir/AAAR/aaar/logs/"
export cluster_logs_dir="/hadoop/cluster_logs/AAAR/"
test_general_config_file
source "/data/workdir/user/m292121/properties/test_job_config_file"
export TIMESTAMP=`date '+%Y%m%d_%H%M%S'`
export DT_INICIO=`date "+%Y-%m-%d %H:%M:%S"`
export HOST_NAME=`hostname -s`
export DIR=$(pwd)
export ULTIMO_ERRO='EXECU��O SEM ERROS'
export DATA_PROCESSAMENTO=`date '+%Y%m%d'`
export GF_NAME_JOB = $NAME_JOB
and I want to get the value of NAME_JOB from the Job_config_file and save it in the GF_NAME_JOB var in the general_config_file.
So, my sh script would be able to get the value of GF_NAME_JOB
sh_script
#!/bin/bash
source "/data/workdir/user/m292121/properties/test_general_config_file"
echo $GF_NAME_JOB
and when I ran this, I got the error:
sh test_shell.sh
/data/workdir/user/m292121/properties/test_general_config_file: line 10: export: `=': not a valid identifier