1 grep的几个参数
-a 在二进制中以文本方式Search
-c 计算次数
-v 输出不匹配的行
-n 输出行号
2 javascript用正则表达式来写trim函数
str.replace(/(^/s)|(/s$)/g,"")
3 var re =
* 重复0到多个前一个字符
+重复1到多个前一个字符
4 egrep 高级正则表达式。
.除了\t\n\r等剩下的其他字符。
\d数字
\D非数字
\s空格
\S非空格
\w字符
\W非字符
(?=...) Positive lookahead
(?!...) Negative lookahead.
5 写个Shell脚本运行同步程序。
在Linux下运行Java(注意用冒号来分割,并且将cp括起来,linux下分号表示命令结束,需要另起一行)
java -cp "WEB-INF/classes:WEB-INF/lib/common-logging-1.2.4.java" com.taobao.jirautil.SyncMain
6 Linux下设置环境变量
PATH="PATH":~/bin
export PATH
7 数值计算
total=$((aa*bb))//记得中间没有任何空格分割
8 使用test -参数来判断
#1 test string
test -z $fileName && echo "you MUST input a filename." && exit 0
#2 test fileName
test ! -e $fileName && echo "the file $fileName MUST exist." && exit 0
#3 find file property
test -f $fileName && fileType="file"
test -d $fileName && fileType="directory"
test -r $fileName && perm="readable"
test -w $fileName && perm="$perm writable"
test -x $fileName && perm="$perm excutable"
echo "$fileName is a $fileType,the permission is $perm"
7 Shell命令。
kill -KILL(必杀) PID
netstat -antp
all numeric trimming program
分享到:
相关推荐
Linuxshell大作业.pdf
linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux shell编程指南linux ...
LINUX SHELL命令练习 题
linux shell学习资料:Linux Shell从入门到精通、Linux Shell编程艺术、Linux Shell脚本攻略
Linux Shell Scripting Cookbook(3rd) 英文mobi 第3版 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
Linux Shell脚本手册 - 第三版,. This book will take you through useful real-world recipes designed to make your daily life easier when working with the shell.
LinuxShell脚本编程实例.pdf
Linux Shell常用技巧Linux Shell常用技巧
linux shell 视频教学 轻松学习shell
Proper usage of shell commands can easily solve many complex tasks with a few lines of code, but most linux users don't have the right know-how to use the Linux shell to its full potential. ...
linux shell 应用.chm,学习linux shell资料
LinuxShell.pdf LinuxShell.pdf LinuxShell.pdf
Linux Shell实例精讲,大量实例shell,容易理解和实践
LinuxShell编程基础教程.pdf
linux_shell编程入门书籍,配合实例讲解,有助于新手入门,欢迎下载
linux shell 编程电子书,学习linux shell很不错的资料,高清的
本书由浅入深、循序渐进地详细讲解了LinuxShell编程的基本知识。这些基本知识包括Shell编程的基本知识、文本处理的工具和方法、正则表达式、Linux系统知识等。 本书旨在通过理清Linux Shell编程的脉络,从基本概念...
Linux shell 脚本攻略,学习linux新手入门的较好教材,第二版,现已出版第三版
Linux_shell脚本全面学习 Linux_shell脚本全面学习
Learning Linux Shell Scripting 2nd Edition pdf Break through the practice of writing tedious code with shell scripts Key Features Learn to impeccably build shell scripts and develop advanced ...