How to return back the value from shell script to a called script

view full story

http://www.unix.com – Hi all, Could you please let me know how to return back the value calculated from a shell script to the main script from where its called from. shell: KSH example: i have two shell scripts a.sh and b.sh. i am calling b.sh from a.sh and in b.sh suppose i calculate the word count and other calculations, How can i pass this value calculated from this b.sh script back to a.sh example code a.sh: -------------------- #!/bin/ksh /bin/b.sh echo $count echo $count1 echo $count2 example code b.sh: -------------------- #!/bin/ksh count=`wc -l /data/wc-l a.csv` export count (HowTos)