随笔分类 -  Shell

摘要:方法1:使用/dev/urandom [root@localhost shell]# tr -dc "0-9" < /dev/urandom | head -c 10 #生成10个数字 5798734885 [root@localhost shell]# [root@localhost shell] 阅读全文
posted @ 2019-05-09 13:37 Tech_Shrimp 阅读(2470) 评论(0) 推荐(0)
摘要:设置变量的作用范围 格式1:export 变量名 ... 格式2: export 变量名=变量值 ... —— 两种格式可以混合使用 export 查看全局变量 更改环境变量 PATH [root@centos6-y ~]# echo $PATH /usr/lib64/qt-3.3/bin:/usr 阅读全文
posted @ 2019-05-09 13:36 Tech_Shrimp 阅读(912) 评论(0) 推荐(0)
摘要:变量的作用: 为灵活管理Linux系统提供特定参数,有两层意思: 变量名:使用固定的名称,由系统预设或用户定义 变量值:能够根据用户设置、系统环境的变化而变化 变量的类型 自定义变量:由用户自己定义、修改和使用 环境变量:由系统维护,用于设置工作环境 位置变量:通过命令行给脚本程序传递参数 预定义变 阅读全文
posted @ 2019-05-09 13:32 Tech_Shrimp 阅读(190) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2019-03-12 18:38 Tech_Shrimp 阅读(261) 评论(0) 推荐(0)