rrrkrishnan
Programmer
I am using this command in a shell script to read the value for these variables from a file.
IFS=" "
tail -1l $HOME/extr_prd | read extr_prd_begin_dt extr_prd_end_dt
Then I use these variables in insert stmts like ,
insert into tbl
(begin_dt,
end_dt)
values
($extr_prd_begin_dt ,
$extr_prd_end_dt);
Now when I execute the shell script by just specifying the name of the shell script at shell prompt like in $shell_script_name.sh, it works fine.
But when I use nohup, like in
nohup script_name > log_file_name &
the variable substitution doesn't happen in the insert stmt.
Any help with this is much appreciated.
Thanks!!!
IFS=" "
tail -1l $HOME/extr_prd | read extr_prd_begin_dt extr_prd_end_dt
Then I use these variables in insert stmts like ,
insert into tbl
(begin_dt,
end_dt)
values
($extr_prd_begin_dt ,
$extr_prd_end_dt);
Now when I execute the shell script by just specifying the name of the shell script at shell prompt like in $shell_script_name.sh, it works fine.
But when I use nohup, like in
nohup script_name > log_file_name &
the variable substitution doesn't happen in the insert stmt.
Any help with this is much appreciated.
Thanks!!!