2
votes
4answers
195 views

separate a file into several small files according to columns

I have a data file, which can have N rows, and each row is composed M elements separated by white space. Currently, I want to separate each row into several segments. In other words, assume the ...
1
vote
2answers
544 views

How can I right-justify variable length output?

So I don't want this: echo "9" 9 Rather I need this, with e.g.: 4 spaces before it: MAGICK "9" 9 So if I try it with 10: MAGICK "10" 10 then it will just have 3 spaces before it. How ...
16
votes
5answers
19k views

combine text files column-wise

I have two text files. The first one has content: Languages Recursively enumerable Regular while the second one has content: Minimal automaton Turing machine Finite I want to combine them into ...
20
votes
6answers
7k views

sort but keep header line at the top

I am getting output from a program that first produces one line that is a bunch of column headers, and then a bunch of lines of data. I want to cut various columns of this output and view it sorted ...
3
votes
2answers
1k views

Split a line into columns with some of the columns right-justified?

Is there an easy way to split comma-delimited lines of text into columns with some of the columns right-justified? As a bonus, it would be nice to format numbers, but this probably isn't too hard ...