Magic Banana, teaching, says:

> > cat CPV-ThreeNone-Output.txt | more [and remove the intervening rows & trailing dots with LibreOffice Calc]

> I do not think you realize how much time of your life you could save by seriously learning (say for ~10 hours) GNU's text-processing commands.

Magic Banana, continuing:

> I do not know what you call an "intervening row".

Read on for a hands-on demonstration.

> > cat CPV-joined-TwoCols.txt [the two fields are separated by spaces; tabs would be better]

> Same remark as above:
>$ tr -s ' ' '\t' < CPV-joined-TwoCols.txt
> (If the separator is always one single space, the option -s is useless.)

Leafpad dodges the scripting language hurdles with search-and-replace-all; see below.

amenex responds with more homework:

time tr -sc 0-9\\n ' ' < CPV-ThreeNone.txt | awk '{ k = 0; for (i = 0; k < 4 && ++i specify its output format. The 'info' pages are not only more complete, they are also more user-friendly
> (more explanations, examples, etc.).

This is where I found out the "join" syntax used in my previous post: https://www.howtoforge.com/tutorial/linux-join-command/
where it's said:

>> Now, if you want the second field of each line to be the common field for join, you can tell this to the tool by >> using the -1 and -2 command line options. While the former represents the first file, the latter refers to the >> second file. These options requires a numeric argument that refers to the joining field for the corresponding file.
>
>> For example, in our case, the command will be:
>
>> join -1 2 -2 2 file1 file2
>
>> And here's the output of this command: https://www.howtoforge.com/images/linux_join_command/join-custom-fields.png
>
>> Note that in case the position of common field is same in both files ...

I had been thinking of consecutive actions, whereas join does them in parallel.

Reply via email to