上一页 1 ··· 6 7 8 9 10

2019年1月2日

shell编程程序实例

摘要: 1、计算器 #!/bin/bash #test #by authors hdc 2018 function add(){ #实现加法 c=$[ $a + $b ] #相加 echo $c } function sub(){ #实现减法 c=$[$a - $b] echo $c } function 阅读全文

posted @ 2019-01-02 17:16 hdc520 阅读(331) 评论(0) 推荐(0) 编辑

shell编程基础知识2

摘要: 1、一维数组 定义:A={test1 test2 test3} 引用:echo ${A[0]} 表示引用第一个数组变量 echo ${A[1]} 表示引用第二个数组变量 显示数据参数:echo ${A[@]} 显示参数个数 echo ${#A[@]} 替换数组元素test2换成test5 ->ech 阅读全文

posted @ 2019-01-02 17:05 hdc520 阅读(142) 评论(0) 推荐(0) 编辑

2018年12月31日

Linux小技巧

摘要: 1、虚拟机安装教程https://blog.csdn.net/qauchangqingwei/article/details/80858334 2、利用VMware tools实现主机与虚拟机之间的文件共享 方法一: 1)安装VMtool ,弹出镜像 2)点击虚拟机–安装vmtools 3)回到ub 阅读全文

posted @ 2018-12-31 14:42 hdc520 阅读(236) 评论(0) 推荐(0) 编辑

2018年12月29日

shell编程之基础知识1

摘要: 1、shell脚本的基本格式 #!bin/bash ->看到这个就是shell脚本 #filename:test.sh ->脚本名称 #auto echo hello world ->此脚本实现的功能,这里指的是输出hello world #by authors ->作者 2、shell脚本的三种执 阅读全文

posted @ 2018-12-29 17:27 hdc520 阅读(159) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10

导航