Shell: readonly介绍_shell readonly-CSDN博客

网站介绍:文章浏览阅读3.3k次。1. 概念readonly在shell脚本中,用来标记变量是只读的,后续执行过程中就不能对其值进行改变,这个用来定义一些常量类的变量. 如果对其进行重新赋值,会提示错误[root@localhost etc]# hours_per_day=24[root@localhost etc]# echo $hours_per_day 24[root@localhost etc]# readonl..._shell readonly