i'll try to keep this simple...
i have a script that sets up my environment and creates a command line variable to execute. when i execute the variable i get an error telling me it cannot open one of the files on the command line. the error prints a file name that is definitely available for open. however, if i echo the variable and copy/paste the value it returns the command executes fine.
export OMP_NUM_THREADS=1;
cd "/cadhome/analysis/username/lms_example1/";
"/usr/apps/LMS/12/Sysnoise/Lms/XPR.R12/Sysnoise/5.6/bin/sysnoise" -hf "/cadhome/analysis/username/lms_example1/3906717-hostfile.LMSVldb" -parallelism frequency
The first thing I would do is take the double quotes off of the contents of $SH_FILE:
export OMP_NUM_THREADS=1;
cd /cadhome/analysis/username/lms_example1/
/usr/apps/LMS/12/Sysnoise/Lms/XPR.R12/Sysnoise/5.6/bin/sysnoise -hf /cadhome/analysis/username/lms_example1/3906717-hostfile.LMSVldb -parallelism frequency
and I don't think they're needed in $LMSDB_FILE either.
i could certainly do that but the only thing i'm taking from that file are the last few arguments on the last line of the file via tail and awk. i should have posted the CMD_LINE value:
I think the reason it is failing is because the directory string is enclosed in double quotes in the variable CMD_LINE and it has to do with the way the shell sees this when you try to execute it as a variable.
port43,
i'll admit i thought you were all wet but not to ignore any suggestion when asking i ran $SH_FILE and $LMSDB_FILE through sed and stripped all the quotes out. so the end result was a quote free $CMD_LINE variable and wouldn't you know it, it worked!
i never gave those quotes a second thought since they're supplied to me via some GUI as setup files for a hand run calculation. i just took from them what i thought i needed and made a CMD_LINE variable to execute. knowing up front they weren't needed i should have just took them out but i never thought they'd be an issue. remind me to never doubt you again! thanx for the help!!
joe.