linux系统-shell编程-几个shell脚本
一 灭掉用户 killuser.sh
#!/bin/sh
# The script to kill login user
user_name="$1"
/bin/ps aux | /bin/grep $user_name | /bin/awk `{ print $2 }` > /tmp/temp.pid
kill_i...
分类:
系统相关 时间:
2015-04-19 08:55:54
阅读次数:
166
背景:最近项目中遇到的实际问题较多,且大多是较隐蔽的、不易被发现的错误。究其根源来看,还是对DICOM3.0协议中的细节掌握不够仔细。继前篇剖析DicomClient函数调用逻辑错误导致的System.ObjectDisposedException异常后,接下来讲解关于DICOM胶片打印服务PresentationContext协商中MetaSOPClass与SOPClass的对比。...
分类:
Web程序 时间:
2015-04-19 01:15:09
阅读次数:
365
1 public class Leaf { 2 3 int i = 0; 4 5 Leaf inceament() { 6 i++; 7 return this; 8 } 9 10 void print() {11 ...
分类:
编程语言 时间:
2015-04-19 01:11:18
阅读次数:
213
grep 搜索文本文件中与指定正则表达式匹配的行命令格式grep [OPTIONS] PATTERN [FILE...]命令参数Generic Program Information--help 打印帮助信息-V, --version 打印版本信息Matcher Selection-E, --e.....
分类:
系统相关 时间:
2015-04-18 21:59:35
阅读次数:
204
看了http://www.cnblogs.com/lixiaohui-ambition/archive/2012/08/21/2649052.html,所以自己写了几行代码测试了下#include int main(){ printf("date:%s",__DATE__); print...
分类:
其他好文 时间:
2015-04-18 21:54:57
阅读次数:
147
Python逐行读取文件内容thefile= open("foo.txt") line = thefile.readline() while line: print line, line = thefile...
分类:
编程语言 时间:
2015-04-18 20:32:09
阅读次数:
131
今天开始Linx shell的第一篇今天介绍 pwd和cd的使用方法。pwd的意思是“print working Directory”,显示用当前所在位置。pwd还有其他可用的参数 -L(大写),-P(大写)-L是显示当前用户的位置 和pwd相同-P 显示用户当前物理位置 和pwd相同其实直接用pw...
分类:
系统相关 时间:
2015-04-18 17:27:43
阅读次数:
174
SUB端口可以连接多个PUB端口 context?=?zmq.Context()
socket?=?context.socket(zmq.SUB)
print("Collecting?updates?from?weather?server...")
socket.connect("tcp://localhost:5666")
socket.connect...
分类:
其他好文 时间:
2015-04-18 01:16:03
阅读次数:
133
Linux常用命令英文全称与中文解释Linux系统man: Manual 意思是手册,可以用这个命令查询其他命令的用法。pwd:Print working directory 意思是密码。su:Swith user 切换用户,切换到root用户cd:Change directory 切换目录ls:L...
分类:
系统相关 时间:
2015-04-18 01:06:26
阅读次数:
221
#include
using namespace std;
#include
void JiaoHuan(int *a,int *b)
{
int t=*a;*a=*b;*b=t;
}
void JiaoHuan(int &a,int &b)
{
int t=a;a=b;b=t;
}
void print(int& n)
{
cout<<&n<<'\t'<<hex<<showbase<<n<...
分类:
编程语言 时间:
2015-04-17 18:25:15
阅读次数:
158