
Linux/Unix shell
文章平均质量分 75
chlaws
希望身体健康
展开
-
随笔一个shell
简单的一个shell有兴趣的可以看看,纯粹自娱自乐 #! /bin/bash#This script function is display OS pid list by used command pslspids(){#HEAD=false#USAGE="Usage: $0 [-h] process"##if [ $1 = "-h" ];th原创 2009-10-07 09:26:00 · 713 阅读 · 0 评论 -
tigase 安装后出现登陆错误原因
原帖在这里http://www.tigase.org/content/tigase-db-errorclient-cant-logintigase db error,client can't loginPost Reply5 replies [Last post]Mon, 2012-10-15 03:12原创 2012-10-16 10:19:36 · 5481 阅读 · 0 评论 -
Beej's Quick Guide to GDB
Beej's Quick Guide to GDBRelease 2 (2009 Jun 14)This is a very quick-and-dirty guide meant to get you started with the GNU Debugger, gdb, from the command line in a terminal. Often times gdb is转载 2012-08-18 00:21:25 · 1860 阅读 · 0 评论 -
传递shell脚本中的数组给awk
传递Linux shell 数组给awk原创 2011-02-22 17:27:00 · 6467 阅读 · 0 评论 -
慎用. 或 source去执行脚本
慎用. 或 source去执行脚本,linux,shell,bash原创 2011-02-16 13:00:00 · 1630 阅读 · 0 评论 -
Linux时区、时间的更改
<br /><br /> Linux 时钟分为系统时钟(System Clock)和硬件(Real Time Clock ,简称RTC )时钟。系统时钟是指当前Linux Kernel中的时钟,而硬件时钟则是主板上由电池供电的时钟,这个硬件时钟可以在BIOS中进行设置。当Linux 启动时,硬件时钟会去读取系统时钟的设置,然后系统时钟就会独立于硬件运作。<br /> <br /> Linux中的所有命令(包括函数)都是采用的系统时钟设置。在Linux中,用于时钟查看和设置的命令主要有date、hwcl转载 2010-11-15 11:21:00 · 729 阅读 · 0 评论 -
用shell写的一个电话簿
#! /bin/bash#script filename:addbook.bsh#comment:add info to datafile#datafile:conn.dat#initialize the variablesDATAFILE="conn.dat"NAME=""PHONE=""ADDRESS=""EMAIL=""#check in argume原创 2009-10-21 09:11:00 · 1847 阅读 · 1 评论 -
Uinx Shell by Example,3rd Edition第7章 awk编程 章节的答案
使用命令awk -f scriptname filename来运行如第一个脚本名是bigawk.sc1 文件名是datafile #datafile的内容和前面的内容是一样的,这里就不贴了,可以去看我上一节的那么实际命令: awk -f bigawk.sc1 datafile再说明下最后一个是通过命令行去传递的参数实际命令是:awk -f myfunc.sc 3 datafi原创 2009-10-21 08:56:00 · 984 阅读 · 0 评论 -
Uinx Shell by Example,3rd Edition第5,6章 awk 章节的答案
#说明下我系统是fedora8。 awk实际是链接到gawk,也就是说调用awk实际调用的是gawk文件名datafile内容如下:Mike Harrington:(510) 548-1278:250:100:175Christian Dobbins:(408) 538-2358:155:90:201Susan Dalsass:(206) 654-6279:250:60:50A原创 2009-10-19 14:14:00 · 2522 阅读 · 0 评论 -
Uinx Shell by Example,3rd Edition第4章sed章节的答案
POSITION:中文实体书的65页英文PDF电子书的104页 文件datafile内容如下:Steve Blenheim:238-923-7366:95 Latham Lane, Easton, PA 83755:11/12/56:20300Betty Boop:245-836-8357:635 Cutesy Lane, Hollywood, CA 91464:6/23/原创 2009-10-18 17:19:00 · 2424 阅读 · 0 评论 -
Uinx Shell by Example,3rd Edition第3章grep章节的答案
有更好,更有效的答案请和我交流以下答案都经过测试#Practice: 1: Print all lines containing the string San. 2: Print all lines where the persons first name starts with J. 3: Print all lines ending in 700. 4: Pri原创 2009-10-17 21:24:00 · 2169 阅读 · 0 评论 -
shell解析ini文件
做个shell解析ini文件,用作搭建HA框架中的解析ini配置文件测试的ini文件是系统里面搜到的一个# Example driver definitions# Driver from the postgresql-odbc package# Setup from the unixODBC package[PostgreSQL]Description = ODBC for Po原创 2013-04-14 14:09:44 · 9249 阅读 · 0 评论