The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 10-29-2008
indianjassi indianjassi is offline
Registered User
  
 

Join Date: Sep 2008
Posts: 24
Manipulating a variable across multiple shell scripts

I have a shell script similar to:

#!/bin/sh
a=1
source a1.sh
-- Modifies a
source a2.sh
-- Modifies a
echo "After execution, value of a is $a"


What i need is a1.sh script modify the same variable a and same with a2.sh. Now the echo "After execution, value of a is $a" should print the value of a after manipulation in the scripts, and not 1 (value in calling script).
Is it possible?