![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
bash
大江1992815
这个作者很懒,什么都没留下…
展开
-
实验楼 Shell
shell入门1.编写:$ vim hello.sh #编写一个hello world的Shell脚本#!/bin/bash# This is a commentecho Hello World2.运行shell脚本的两种方式1.直接使用bash or zsh进行运行$bash hello.sh或者是$zsh hello.sh2.更改hello.sh的权限,使之成为可以执行的文件$chm原创 2017-03-20 14:31:57 · 483 阅读 · 0 评论 -
bash 符号篇
1.注释符号“#”“#”用于注释 “#!”用于说明用什么脚本解释器(bash、zsh等等)2.命令分隔符“;”例子:#!/bin/bashecho hello; echo therefilename=ttt.shif [ -r "$filename" ]; then # 注意: "if"和"then"需要分隔 echo "File $filename exists."; cp原创 2017-03-20 16:03:54 · 969 阅读 · 0 评论