The line numbers and indents were added by the incomprehensible composition code.

It is comprehensible: https://trisquel.info/en/filter/tips

I'll add helpful comments before I forget how Magic Banana's excellent script is to be used.

Again (it must be at least the fourth post in which I write that): an help message is displayed if you do not call the script enough arguments. For instance, with your terrible name:
$ ./MB.suggestion02
Usage: ./MB.suggestion02 PRT_list IPv4_addresses [output_dir]
Both files must have two fields. The first field must be the PTR and must be unique in PTR_list.

If the message is not meaningful to you, you can modify it: just edit the argument of printf.

The outputs are files in the working directory but will benefit from being placed by themselves in a
subdirectory.

Again: the first version of the script, in https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150649, forces you to specify an output directory (no default).

Magic Banana's script rejected a duplicate line; mine didn't

In your original post, it did. That is why I did the same, as I explained in https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150709

I corrected that by applying "sort -u" to the 2nd file in the join command (I checked; it doesn't draw any complaint from the terminal)

You do not want to use your solution, which is much slower (among other reasons): https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150709

I'm learning to do some of this scripting task myself.

You repeatedly make the same mistakes (useless commands, wrong arguments given to sort -k, etc.). You obviously have a hard time reading documentation or what I wrote. You are finally confirming that the command line I gave in my first reply is perfectly fine (the scripts I then gave just ease its reuse: a help message and positional arguments rather than hard-coded ones). Despite that correct answer right from the start, look at the length of this thread...

Adding the ability to use arguments is a task for another day

It is trivial: just write "$1" for the first argument given to the script, "$2" for the second, etc.

Reply via email to