Read only variables in Bash Scripting
- 
					
					
					
					
 මේ link වලින් ගිහින් ඔයාලට bash script ගැන කලින් කරපු post බලාගන්න පුලුවන්.. Lets talk about bash script - https://lankadevelopers.com/topic/371/lets-talk-about-bash-script First bash script - https://lankadevelopers.com/topic/372/first-bash-script Sum of two numbers in bash script - https://lankadevelopers.com/topic/377/sum-of-two-numbers-in-bash-script Bash script Array introduction - https://lankadevelopers.com/topic/386/bash-script-array-introduction මොකක්ද මේ කතාව හරි මෙන්න මෙහෙමයි. 
 අපි Bash Script එකක් ලියනකොට අපිට ඕනි වෙනව වෙනස් කරන්න බැරි විදියට variables හදන්න ඒ කිවුවේ මෙන්න මෙහෙම.
 හිතන්නකො මම මුලින්ම x = 5 කියල value එකක් දෙනව කියල මම ඊලග code line එකේ x=8 කියල දුන්නම x ගේ value එක 8 ක් වෙනවාx=5 echo "$x" x=8 echo "$x"මෙන්න මේ වැඩේ අපිට නතර කරගන්න පුලුවන් readonly variable use කලාම. ඔන්න බලන්න ඒක කරන විදිය #!/bin/bash readonly x=5 #අපි x ව readonly variable එකක් කලා echo "$x"#එයාව print කරනවා x=9 #ඔන්න දැන් එයාව වෙනස් කරන්න හදනව ඒ නිසා අපිට පෙන්නනව එයාව වෙනස් කරන්න බෑ කියල echo "$x" 
- 
					
					
					
					
 superb bro 
- 
					
					
					
					
 good work bro 
 
			
		