ksh - Calling and returning a value from shell script using nohup -


i have 2 shell script files . 1 general file install on system , other file processes steps of installation.

file1: main installation file file2: installation assistance file

i calling file2 file1 using

 nohup ./file2.sh $1 </dev/null >../logs/schema.log 2>&1 &  schema_status=$?  echo $schema_status 

now because of nohup schema_status value coming 0 always.

how return relevant value file2 file1 .

in file2, have added return statement:

if (condition)    exit 101 else    exit 102 fi 

please go through link problem similar discussed. suggest export environment variable in file1.sh , set environment variable in file2.sh. able return(indirectly) file2.sh file1.sh

pass variables 1 shellscript another?


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -