python/shell/perl
uvsjoh
旅游、摄影、探险、游戏、运动。
展开
-
备份程序
<br />#!/usr/bin/python #Filename: back.py '''Backup uitility (Windows version)''' import os import time # switch of debuging DEBUG = True OS = "WINDOWS" # definitions of global if OS == "WINDOWS": rarPath = r'C:/Program Files/WinRA原创 2011-04-13 06:56:00 · 549 阅读 · 0 评论 -
pickle 出错
<br />import cPickle as p<br />#import pickle as p<br /><br />shoplistfile = 'shoplist.data'<br /># the name of the file where we will store the object<br /><br />shoplist = ['apple', 'mango', 'carrot']<br /><br /># Write to the file<br />f = file(shoplist原创 2011-04-15 07:07:00 · 1519 阅读 · 2 评论 -
awk笔记
#!/bin/sh if [ $# != 2 ];then echo "Usage: find.sh delta log_file/n eg: find.sh 300 SCP2007.log" exit 1; fi if [ "$1" = "" ]原创 2011-02-22 14:25:00 · 374 阅读 · 0 评论