msgbartop
Blog di Dino Ciuffetti (Bernardino in realtà)
msgbarbottom

12 Giu 14 How to declare a read only variable in bash

I didn’t know that it was possible to declare a read only variable in bash.

It’s as simple as to run the following statement:

declare -r a=10

This will create a read only variable called $a with value 10 that you cannot overwrite or unset.
Cool!!

Lascia un commento

*