免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 7845 | 回复: 5
打印 上一主题 下一主题

如何取消readonly?? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2003-06-20 17:04 |只看该作者 |倒序浏览
我设置了一个变量为readonly,在shell下作试验的,结果要unset就不给了,我想知道如何取消掉readonly

刚开始学shell编程。新手,多多关照。
谢谢!!!

论坛徽章:
0
2 [报告]
发表于 2003-06-20 19:18 |只看该作者

如何取消readonly??

出于安全的原故,只读变量是不可以被复位/取消的!

论坛徽章:
0
3 [报告]
发表于 2003-06-21 03:05 |只看该作者

如何取消readonly??

原帖由 "SickWorm" 发表:
我设置了一个变量为readonly,在shell下作试验的,结果要unset就不给了,我想知道如何取消掉readonly

刚开始学shell编程。新手,多多关照。
谢谢!!!
   


多矛盾啊,
既然你要更改它,
怎么当初设它为 readonly ?

论坛徽章:
0
4 [报告]
发表于 2003-06-21 09:25 |只看该作者

如何取消readonly??

原帖由 "红袖添香" 发表:
   


多矛盾啊,
既然你要更改它,
怎么当初设它为 readonly ?
   


哎呀,就是边看书边试验的,结果也没提醒说不能取消的,等我做完,才发觉问题出来了。

没办法,谁叫咱是新手呢!!

论坛徽章:
0
5 [报告]
发表于 2003-06-22 00:03 |只看该作者

如何取消readonly??

readonly: readonly [-anf] [name ...] or readonly -p
    The given NAMEs are marked readonly and the values of these NAMEs may
    not be changed by subsequent assignment.  If the -f option is given,
    then functions corresponding to the NAMEs are so marked.  If no
    arguments are given, or if `-p' is given, a list of all readonly names
    is printed.  An argument of `-n' says to remove the readonly property
    from subsequent NAMEs.  The `-a' option means to treat each NAME as
    an array variable.  An argument of `--' disables further option
    processing.

论坛徽章:
0
6 [报告]
发表于 2003-06-23 07:49 |只看该作者

如何取消readonly??

原帖由 "deathcult"] 发表:
or readonly -p
    The given NAMEs are marked readonly and the values of these NAMEs may
    not be changed by subsequent assignment.  If the -f option is given,
    then functions corresponding ..........

真羡慕能看到MAN的帮助~~哎~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP