refer: http://blog.donews.com/chnl/archive/2006/06/27/928873.aspx
由于工作,需要经常性地对一些文本进行处理。比较常用的大多是Linux系统下的一些实用工具如,grep,awk,sed,tr,sort,uniq等。由于工作的PC是Windows平台,所以免不了要把原始的文件上传到Linux系统上,进行一番处理后,再重新下载回Windows系统。每天都来来回回的,真得很麻烦,直到有一天发现并安装了UnixUtils。
UnixUtils是SF上的一个项目,最新版本可以从这里得到, http://unxutils.sourceforge.net/。其大小只有几M,现在能够提供的命令列表为:
H:/Chenl/bin/ux/usr/local/wbin>ls
agrep.exe expr.exe man.exe sum.exe
ansi2knr.exe factor.exe md5sum.exe sync.exe
basename.exe fgrep.exe mkdir.exe tac.exe
bc.exe find.exe mkfifo.exe tail.exe
bison.exe flex.exe mknod.exe tar.exe
bunzip2.exe fmt.exe mv.exe tee.exe
bzip2.exe fold.exe mvdir.exe test.exe
bzip2recover.exe fsplit.exe nl.exe touch.exe
cat.exe gawk.exe od.exe tr.exe
chgrp.exe gclip.exe paste.exe tsort.exe
chmod.exe gplay.exe patch.exe type.exe
chown.exe grep.exe pathchk.exe uname.exe
cksum.exe gsar.exe pclip.exe unexpand.exe
cmp.exe gunzip.exe pr.exe uniq.exe
comm.exe gzip.exe printenv.exe unrar.exe
compress.exe head.exe printf.exe unshar.exe
cp.exe id.exe ptx.exe unzip.exe
csplit.exe indent.exe pwd.exe uudecode.exe
cut.exe install.exe recode.exe uuencode.exe
date.exe join.exe rm.exe wc.exe
dc.exe jwhois.exe rman.exe wget.exe
dd.exe less.exe rmdir.exe wget.hlp
df.exe lesskey.exe sdiff.exe which.exe
diff.exe libfl.a sed.exe whoami.exe
diff3.exe libfl.lib seq.exe xargs.exe
dircolors.exe ln.exe sha1sum.exe yes.exe
dirname.exe logname.exe shar.exe zcat.exe
du.exe ls.exe sleep.exe zip.exe
echo.exe m4.exe sort.exe zsh.exe
egrep.exe make.exe split.exe
env.exe makedepend.exe stego.exe
expand.exe makemsg.exe su.exe
其发行版本中提供了一个sh.exe,但是个人感觉不是很好用。
在我的PC上,用了以下方式启动:
UnixUtils所在的目录为:H:/Chenl/bin/ux,其命令所在目录为:H:/Chenl/bin/ux/usr/local/wbin
启动的脚本sh.cmd的内容为:
@echo off
set Opath=%path%
path=H:/Chenl/bin/ux/usr/local/wbin;%path%
set ps1=SH#
cd /d H:/Chenl/bin/ux/usr/local/wbin
start "UnixUtils"
cd /d h:/chenl/bin
path=%Opath%
@echo on