文字去的理由,以获得正确的子 [英] Text de-justification to get correct substring
问题描述
我有,它是由具有证明一个文本文件(所有选项卡对齐 - 不同的大小)。
因此,我不能得到在某一列(子串)所需的值。
由于这是一个迁移我不能改变的文件的格式。
I have a text file which is made up with justify (all tabs aligned - different size).
Therefore I can't get the desired value at a certain column (substring).
Since this is a migration I can't change the format of the file.
我如何去自圆其说的文字空间,而preserving的间距长度,任何脚本在那里?
How can I "de-justify" the text to spaces while preserving the spacing length, any scripts out there?
我需要的上限值。用固定值替换\ T没有帮助。
I need the upper value. replacing \t with a fixed value doesn't help.
*编辑:文件似乎与格式化 FMT
* files seems to be formatted with fmt
* EDIT2:解决发现它似乎;当我使用格式化的Windows(的coreutils )它保持不变。
但是我的Mac上我得到了想要的结果(也许东西在win命令不设置右)。
* Solution found it seems; when I use fmt on windows (coreutils) it stays the same.
However on my mac I get the desired result (maybe something in the win command not setup right).
fmt original_file >> new.txt
GRTS
Grts
推荐答案
有可能是很多其他的方法可以做到这一点,但崇高的文本已内置选项卡空间的转换。
There's probably lots of other ways to do this, but sublime text has built in tab to space conversion.
http://css-tricks.com/changing-spaces-tabs -sublime文/
这篇关于文字去的理由,以获得正确的子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!