windows命令从文本中切割列 [英] windows command for cutting columns from a text
本文介绍了windows命令从文本中切割列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
有从Windows命令行提取第五列(下面的表中有些像unix剪切命令)
Is there away to extract 5th column in the following table from the windows command line (some thing like unix cut command)
chrome.exe 512 Console 0 73,780 K
chrome.exe 800 Console 0 11,052 K
chrome.exe 1488 Console 0 92,720 K
chrome.exe 1600 Console 0 32,344 K
chrome.exe 2240 Console 0 35,132 K
chrome.exe 2360 Console 0 21,276 K
chrome.exe 3524 Console 0 66,732 K
chrome.exe 3924 Console 0 23,524 K
上述内容存储在文件中。
the above content is stored in a file.
推荐答案
for / ftokens = 5 delims =%i in(file.txt)DO echo%i
for /f "tokens=5 delims= " %i in (file.txt) DO echo %i
这篇关于windows命令从文本中切割列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文