There appears to be a misunderstanding

Maybe.  If only you would give an example of the expected output...

On the other hand, Magic Banana's script is looking at only one of the two files

No, it is not. I do not write scripts taking several files in arguments to only use one.

I've tried to save the scripts as MB.suggestion02.txt & MB.suggestion03.txt, cp them to *.bin and *.sh, respectively

The execution will be the same, whatever the name you give to the script. Indeed, for GNU/Linux systems, extensions do not "exist". Only whole file names do. Now, for users, if there is an extension, it is supposed to indicate the file format: users expect .jpg files to be images and not sounds, for instance. In the same way, .bin files are expected to be binaries and .sh files are expected to be shell scripts. Shell scripts are not binaries. They are plain text files.

./mb.suggestion02.bin filename01 - or ./MB.suggestion03.sh filename02 -

Again: - is the standard input. If you do not redirect it (apparently the case here), it is the keyboard: the script is here expecting you to type the second file.

I do not know how to be clearer on how to call the script: a help message specifies the usage and I gave you an example of a call (using the files you attached) at the end of https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150667

I've tried to save the scripts as MB.suggestion02.txt & MB.suggestion03.txt, cp them to *.bin and *.sh

Directly write the script in a file bearing the name you want to execute it.

chmod +x MB.suggestion02.bin and chmod +x Mb.suggestion03.sh before lastly executing them with ./mb.suggestion02.bin filename01 - or ./MB.suggestion03.sh filename02 -
The error messages repeatedly say for either combination of filenames:
bash: ./MBsuggestion03.sh: No such file or directory or ./MBsuggestion02.bin: No such file or directory

The error messages say neither "./MBsuggestion02.bin" nor "./MBsuggestion03.sh" exist. But if you would have really executed the command you wrote immediately before, the messages would be about "./mb.suggestion02.bin" and "./MB.suggestion03.sh". You would get the same error message if you named the scripts "MB.suggestion02.bin" and "Mb.suggestion03.sh", as the previous sentence suggests.

If you cannot type a same file name twice, you will never manage to execute any script. The letter case matters. And no character can be skipped. Fortunately, auto-completion makes it easy to correctly and efficiently input file names: you should use it.

And, I repeat: you want a meaningful name for the script (pick only one, depending on whether you want the default value for the output directory). I proposed "join-and-group-by-ptr" at the end of https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150667

No new directories appear.

With two arguments, the script in https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150649 displays the help message (because it requires three arguments) and the one in https://trisquel.info/forum/find-instances-each-list-strings-and-print-each-set-separate-file#comment-150667 would write files in the working directory (the default I chose if the third argument is missing).

In my alternative scripting, I created the two necessary directories beforehand.

Two directories? Your original post gave a command line with one single output and you wrote that "each group [of IPv4 addresses] needs to be diverted to a separate filename with ".txt" appended to the unique PTR". How does that make two directories?

Reply via email to