I need to do things like: taking the first x lines of text file and save it int开发者_JAVA百科o another text file, what kind of text utilities can I use in windows?
Use a decent text editor like Notepad++ or Vim.
If you aren't afraid of using the command line, I'd suggest taking a look at Gnuwin32, which is a port of many useful *nix utilities for Windows.
It contains heavyweight such as Sed, Awk, Grep etc., which are more than suited for any kind of text surgery.
if you want to write a batchfiles that extracts the first 10
lines of file myInputFile.txt
to myOutputFile.txt
use
head.exe --lines=10 myInputFile.txt > myOutputFile.txt
head.exe is one of severeal GnuUtilities for MsWindows.
精彩评论