#! /usr/bin/env python | |
from stat import * | |
#!/bin/bash | |
#Define bash global variable | |
#This variable is global and can be used anywhere in this bash script | |
VAR="global variable" | |
#Define bash global variable | |
#This variable is global and can be used anywhere in this bash script | |
VAR="global variable" | |
function bash { #Define bash local variable #This variable is local to bash function only local VAR="local variable" echo $VAR } | |
def bash () : #Define bash local variable | |
#This variable is local to bash function only | |
VAR="local variable" print(str(VAR)) | |
echo $VAR | |
print(str(VAR)) | |
bash | |
bash() | |
# Note the bash global variable did not change | |
# "local" is bash reserved word | |
echo $VAR | |
# Note the bash global variable did not change | |
# "local" is bash reserved word | |
print(str(VAR)) | |
ÿ |