
9. CShell
ccwwff
这个作者很懒,什么都没留下…
展开
-
Shell 脚本中的算术运算与常用条件表达式
1. CShell 脚本第一行:#! /bin/sh 这一行一定写对,否则可能认为是批处理。2. 算术展开:算术表达式置于$(( ))中即可。运算符包括:"++", "- -", "+", "-", "*", "&", ..., 基本与C语言无异。如:example1.sh#! /bin/shi=0echo $((i++))echo原创 2012-05-16 13:46:28 · 3088 阅读 · 0 评论 -
YUV420视频序列转化为单帧PGM灰度图像脚本
1. hdr.txt (for vga, 其他改图像大小), width: 640, height: 480 * 1.5P56407202552. vga_2_pgm.sh (500 frame)#! /bin/shi=0split -b 460800 -d -a 3 file_pathwhile [ "$((i do cat hdr.tx原创 2012-05-16 14:08:58 · 2220 阅读 · 0 评论 -
行文本替换脚本
#! /bin/shcat file.txt | sed '/inputfile/c\inputfile = "xxx.txt"' > file.txt#批处理原创 2012-05-16 14:29:46 · 757 阅读 · 0 评论 -
Bash Shell 重定向(一):原文
From: http://www.gnu.org/software/bash/manual/bashref.html#Redirections3.6 RedirectionsBefore a command is executed, its input and output may be redirected using a special notation interpreted转载 2015-09-17 11:03:44 · 726 阅读 · 0 评论 -
Bash Shell 重定向(二):中文解释
近在看代码的时候看到了很多关于shell重定向的使用,所以特地学习了官方Bash手册,并结合一个网友的博客,在此将内容总结整理一下。转载 2015-09-17 11:06:34 · 3327 阅读 · 0 评论 -
正则表达式总结
~/.bashrc~/.cshrcbash: cygwin, ubuntu, cshell: redhatGNU: bash, make, gawkPOSIX标准 http://wenku.baidu.com/view/6194c12fcfc789eb172dc89f.html所以“POSIX规范的正则表达式”其实只是“关于正则表达式的POSIX规范”,它定义了BR原创 2015-05-13 14:46:12 · 807 阅读 · 0 评论