Unset readonly variable in bash
how to unset readonly variable in Bash? $ readonly PI=3.14 $ unset PI bash: PI: readonly variable or is it not possible? anishsane Actually, you can unset a readonly variable . but I must warn that this is a hacky method. Adding this answer, only as information, not as recommendation. Use at your own risk. Tested on ubuntu 13.04, bash 4.2.45. This method involves knowing a bit of bash source code & it's inherited from this answer. $ readonly PI=3.14 $ unset PI -bash: unset: PI: cannot unset: readonly variable $ cat << EOF| sudo gdb attach $$ call unbind_variable("PI") detach EOF $ echo $PI $ I