查看“Linux-2018-spring-6-12”的源代码
←
Linux-2018-spring-6-12
跳到导航
跳到搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看和复制此页面的源代码。
一、复习内容 *shell中变量的定义 注意变量两边不能有空格 *复杂语句 *shell脚本(求和的例子) #!/bin/bash sum=0 for((i=1;i<101;i=i+1)); do sum=$(($i+$sum)) done echo $sum 二、新内容 *shell脚本的运行方式 1、bash x.sh 2、chmod +x x.sh ./x.sh *“#!/bin/bash ”的作用 1、告诉shell文件类型,打开或解释或运行的方式 2、告诉shell用那种shell运行文件。 *shell中函数的定义和使用 $# -----参数的个数 $* -----字串 $0 -----第0个参数 $1 -----第1个参数 $@ -----数组 $? -----获取返回值 *命令行参数 $nohup bash run0.sh &:后台运行run0.sh 1、[http://hlt.suda.edu.cn/index.php/Linux-2018-spring-run0.sh run0.sh函数] 2、[http://hlt.suda.edu.cn/index.php/Linux-2018-spring-run1.sh run1.sh函数] 3、[http://hlt.suda.edu.cn/index.php/Linux-2018-spring-run2.sh run2.sh函数] 4、[http://hlt.suda.edu.cn/index.php/Linux-2018-spring-run3.sh run3.sh函数] *C语言中的多维矩阵 [http://hlt.suda.edu.cn/index.php/Linux-2018-spring-main main.c函数]
返回至
Linux-2018-spring-6-12
。
导航菜单
个人工具
登录
名字空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
新闻
成员介绍
研究组
科研项目
发表论文
在线演示
工具
链入页面
相关更改
特殊页面
页面信息