批處理加強工具
转自:
http://tw.myblog.yahoo.com/c9993/article?mid=37&prev=73&next=20
在 WIN32的世界中 指令是比較弱的
但在UNIX的圖型是比較不人性的 但指令就可愛很多
弟 有找到在WIN32上使用UNIX的一些簡單小工具
在些介紹一些給大家使用看看
實在對工作幫助很大
不用安裝 只要把 執行檔案放到 PATH 可以到達的地方
首頁
下載
UnxUtils.zip
解出來的路徑 UnxUtils\usr\local\wbin
UnxUpdates.zip
解出來的路徑 UnxUpdates
如果本身對unix的指令很熟的人用這個就如虎添翼
我是把解出來的檔案放到system32下面
使用不覆蓋的方法 不然到時候有問題就不好了
建議 unxutils 的 find 改為 ufind 強烈
date udate
參考
shell學習之路
基本的命令
eg
sed 改字串使用 超方便
sed s/str1/str2/i < file > tagfile
tail 取得檔案從後面數回來幾行
tail -n 4 < file
head 取得檔案前面幾行
head -n 4 < file
如果想要用 unix的指令拿來使用 就可能要跟windows的for整合一下
for /f %i in ('udate +%Y%m%d') do set da=%i
原由
其實那天很妙 就是想要看看有沒有 sh可以在win32上運行
所以在google上打 sh for win32
修改1 2006/07/23
改變的檔案
ren date.exe udate.exe
ren find.exe ufind.exe
ren head.exe uhead.exe
ren echo.exe uecho.exe
========================================
另, 还有:
http://gnuwin32.sourceforge.net/packages.html