Linux: 提示 Tips for shell programming
来源:互联网 发布:一点淘宝客服就登陆 编辑:程序博客网 时间:2024/05/04 11:26
Edit Time: 2006/12/06
By: JonsenElizee
E-mail: JonsenElizee@163.com
##################################################
shell programming:
1: How to suppress the normal output when you grep
2: How to define a array and delete the first item using shift
3: How to subtring when awk
4: How to tr
##################################################
#How to suppress the normal output when you grep
grep 'keyword' ./directory/fileName -q
#OUTCOME NULL
##################################################
#How to subtring when awk
echo "Hello, World" | awk -F, '{print substr($1, 1, 3)}'
#OUTCOME Hel
##################################################
#How to define a array and delete the first item using shift
cat > run.csh
#!/bin/csh
echo $1
shift
echo $1
set v = (a "value1" b "value2")
echo $v
shift v
echo $v
#TO RUN THE SHELL
/bin/csh run.csh param1 param2
#OUTCOME
param1
param2
a value1 b value2
value1 b value2
#COMEOUT
##################################################
#How to tr
echo "hello" | tr 'a-z' 'A-Z'
#OUTCOME HELLO
##################################################
#How to ps and kill
ps -ef | grep keyword
kill processId
- Linux: 提示 Tips for shell programming
- Shell Programming Tips
- linux programming tips
- Tips of Linux C programming
- Tips of Linux C programming
- Linux Shell编程Tips
- Tips for windows shell script
- 15 Tips for Secure Win32 Programming
- 20 Killer Perl Programming Tips for Beginners on UNIX / Linux OS
- Linux Shell programming
- Linux shell Programming
- notes for linux programming
- 5 Shell Scripts for Linux Newbies to Learn Shell Programming – Part II
- Tips: linux shell重定向
- Ubuntu/Linux Tips (shell 快捷键) .
- Programming Tips
- Programming tips
- 【读书笔记0103】Beginning linux programming-shell programming
- 将无符号整型值的每一位转化为字符并打印它
- 聚集索引和非聚集索引
- FC6 on laptop(Toshiba M30)
- 喜欢唐诗宋词的朋友过来
- 新的blog网址为http://supercoder.blog.hexun.com/,欢迎光临!!!
- Linux: 提示 Tips for shell programming
- SQL查询语句优化指南
- 如何在Oracle中设置自增长字段
- 应付不想别人运行你电脑中的程序
- 规范化查询模式并建立与之匹配的索引
- 好不容易解决了个Spring+jsf的问题
- 表达式求值问题
- 使用memcached进行内存缓存
- RTTI(运行时类型识别)问题