Linux shell 脚本
来源:互联网 发布:java毕业设计免费下载 编辑:程序博客网 时间:2024/06/05 17:13
http://man.linuxde.net/
第一行#!指定执行shell的程序bash/sh/dash
#!/bin/bash
# 起到了注释的作用
echo
#! /bin/bash echo this is a test echo this 'is a test' echo this "is a test" echo "this 'is a test'" echo 'this "is a test"'echo "this is $UID" #变量可以直接用在""里claroja@ubuntu:~$ bash testthis is a testthis is a testthis is a testthis 'is a test'this "is a test"this is 1000
变量
赋值时不需要使用
echo $value=1
使用`或者$()进行命令赋值
date`
value=
value=
重定向输出与管道
> >>
< <<
数学运算
1. expr
2. $[ operation ] 这个更加通用
退出状态码
$?
exit 可以指定退出状态码
参考文献:
Linux命令行与shell脚本编程大全
阅读全文
0 0
- linux-shell:shell脚本范例
- [shell脚本] linux shell简介
- Linux shell 脚本
- linux shell 脚本入门
- Linux Shell脚本基础
- Linux shell 脚本
- Linux Shell脚本基础
- linux shell脚本入门
- Linux: shell 脚本入门
- linux脚本(shell)编程
- linux shell 脚本入门
- linux shell脚本学习
- linux脚本(shell)编程
- Linux Shell脚本学习
- Linux Shell 脚本
- LINUX SHELL脚本笔记
- linux shell 脚本
- Linux脚本Shell命令
- C++中set的使用
- 二叉树递归和非递归访问的实现
- Horizon 二次开发
- MFC调用dll文件
- Java习题札记
- Linux shell 脚本
- HDU4686---Arc of Dream(矩阵快速幂,大数据的坑题)
- 学习笔记2017.07.07-day5,am-HTML表单-HTML框架
- 防止Windows自动锁屏的VBA脚本
- 欢迎使用CSDN-markdown编辑器
- mysql 注意事项
- 日期函数
- Js作用域链及变量作用域
- 开源一款资源分享与下载工具 —— 电驴(eMule)