Linux---shell 基本操作符及常见符号
2016-10-13 16:34
387 查看
基本操作符
-s: Check if file has size greater than 0 if yes then condition becomes true.实际应用中,[ -s $file ] 如果$file内容不为空,或者file其实是个folder的话,都返回true
ksh -n
-n Read commands and check them for syntax errors, but do not execute them. Ignored for
interactive shells.
会检查语法中的错误,比如文件中引号是否成对出现等
-h file
True, if file exists and is a symbolic link.如果文件存在并且是是个符号链接。返回true。
-d file
True, if file exists and is a directory. 文件存在并且是目录,返回true
常见符号
$$ 记录脚本运行是的pid,进程号
相关文章推荐
- 【shell】基本操作,和常见的linux内建命令。
- 【程序员技术练级】熟悉Unix/Linux Shell和常见的命令行(一)文件系统结构和基本操作
- Linux常见符号和shell中常用命令
- linux 基础学习之五:shell脚本学习(2)——基本语法
- Linux 常见特殊符号
- Linux学习笔记:Shell基本功能
- 小白学Linux之常见的shell命令
- Linux几种常见shell简介
- Linux的基本概念及man,date,ls常见用法
- Linux 常见特殊符号
- Linux 的shell基本命令
- Linux中基本I/O 重定向的符号及其用法和文件标识符
- 初学Linux[16]--几种常见shell简介
- Linux中基本I/O 重定向的符号及其用法和文件标识符
- linux Linux常见特殊符号 重定向符号
- [Linux学习笔记]第1天:操作系统的发展史,linux诞生,Linux发行商,shell,terminal,shell使用技巧,文件目录,基本操作
- Linux 常见特殊符号
- Linux 打开shell的过程;bash基本使用
- Linux 常见特殊符号
- [Linux]:Bash shell 字符串操作符详解