技术改变生活

博客园 首页 新随笔 联系 订阅 管理

2020年4月8日 #

摘要: 变量自增语法:a=a+1 字符串拼接语法:a=$0" "a shell的终端打印echo hello worldecho "hello world"echo 'hello world'echo "hello world \!"echo 'hello world !'使用不带引号的echo时,没法在所 阅读全文
posted @ 2020-04-08 17:36 小阿峰 阅读(145) 评论(0) 推荐(0) 编辑

摘要: shell格式的if语句: [root@www file_test]# cat if.sh #!/bin/bash#if testif [ $# -eq 0 ];then exitfiif [ $1 -eq 1 ];then echo "the num is : abc"elif [ $1 -gt 阅读全文
posted @ 2020-04-08 15:09 小阿峰 阅读(289) 评论(0) 推荐(0) 编辑