- 博客(11)
- 收藏
- 关注
原创 shell集锦
文件以“:”作为分隔符,每行至少1个,最多不限。如何取出第一个“:”后的所有字符? sed s/[^:]*:// file文件合并,可以使用命令paste paste将把输入文件的对应行合并,输出到标准输出。不是最后一个输入文件的换行符,都将被替换成tab键。如果输入文件中的某一个达到了eof,而其他的尚没有,并不影响合并,将以空代替该文件的输入
2005-10-07 18:39:00 653
原创 Linux/Unix tips
求变量的长度: STR=123 LEN=`expr length $STR` 或者 LEN=$(expr length $STR) 或者 LEN=${#
2005-10-06 11:37:00 614
原创 Unix下的"uniq"命令
uniq -- 过滤文本中的重复行synopsisuniq [-c|-d|-u] [-f fields] [-s char] [input file[output file]]Descriptionuniq从一个输入文件中读入行,比较邻接的各行是否相同。注意:uniq不能发现不邻接的向同行!
2005-10-05 09:09:00 1074
原创 awk
awk的三种调用方法:1. 命令方式awk [-F filed-seperator] awk-command input-files[-F field-seperator]是可选项,awk通常默认的IFS是空格,如果浏览以空格为域分隔符的文本,则该选项可忽略;但如果浏览像passwd这种以冒号为IFS的文本,则需要加上该选项,如:awk -F: awk-command input-file
2005-10-04 15:38:00 906
原创 Sun, Google Form Alliance
Speculation is mounting ahead of Tuesdays upcoming announcement ofa new relationship between Sun Microsystems and Google, but the mostattention is going to the possibility of a software-related
2005-10-04 10:49:00 723
原创 bash内建参数
===========PPID : 该bash的呼叫者process ID. PWD : 目前的工作目录。 OLDPWD : 上一个工作目录。 REPLY : 当read命令没有参数时,直接设在REPLY上。 UID : User ID。 EUID : Effective User ID。 BASH : Bash的完整
2005-10-04 09:53:00 736
原创 shell中的数组
用$varname[0]=value1$varname[1]=value2....来定义用$echo ${varname[0]}方式来引用
2005-10-04 09:45:00 865
原创 "Dogs" of the linux shell
## (1) displays the first 6 lines of a file head -6 readme.txt## (2) displays the last 25 lines of a file tail -25 mail.txt#(3)Heres an example of using head and tail in con
2005-10-04 09:12:00 573
原创 Snetences from internet
The collection of Linux command-line programs is no exception to this generalization.
2005-10-04 08:47:00 612
原创 Shell变量名使用的特殊字符
$# 传送给命令Shell的参数个数 $- 在Shell启动或使用set命令时提供选项 $? 上一条命令执行后返回的值 $$ 当前shell的进程号 $! 上一个子进程的进程号 $@ 所有的参数,每个都用双括号括起
2005-10-03 16:29:00 1014
原创 business English 16
441. We are satisfied with the terms of this contractfor the most part, but we feel that your terms for payment are too xxx.442. We would like to have another discussion of thiscondition in th
2005-10-03 15:59:00 661
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人