bash: Make a shell script variable read only.
-
Take into account the main readme for this section. README first.
Line number five declares the variable read only.
$ cat declare.sh declare -r Time=11.42 echo $Time Time=11.43
Running this script.
$ ./declare.sh 11.42 ./declare.sh: line 4: Time: readonly variable
© Lightnetics 2024