I have had trouble with sort -u and uniq -u, whereas uniq -c works every time

All those commands work all the time.

Running 'uniq -c' and deleting the counts immediately after is the same as using 'uniq' without option -c.

I can find no man page for "fi"

It is "end if" in shell language.  'man sh' says:

     The syntax of the if command is
           if list
           then list
           [ elif list
           then    list ] ...
           [ else list ]
           fi

it is composed with shorthand expressions which I don't comprehend.

It is quite basic shell scripting: [ -n tests whether the subsequent string is nonempty; "$1" is the first argument given to the script; period= defines the variable named period; $period is the value of the variable period; shift shifts the arguments of the script (it sets the value of $1 to the value of $2, the value of $2 to the value of $3, etc.); "$@" is all these arguments.

People usually tend to better comprehend short scripts with short instructions than long command lines using useless options, with calls that do things that are reverted later on the command line, etc.

can I be assured that this sync script is a generalized one that I don't have to modify at all ?

It does what I described in details in the first paragraph of my previous post. Is it what you want?

that would make filename updates every 25 seconds

The file contents are sync'ed, not the file names.

greater frequency would have the list of files changing too frequently.

The smaller the period, the less data you may lose in case of crash, but the more writes to the disk and the worse the performance.

sudo .filename.bin ... alas, Terminal's response was "command not found."

There is no executable named .filename.bin in any directory listed in $PATH. If there is an executable named filename.bin in the working directory and if it accepts 5m as a single argument, you execute it in this way:
$ ./filename.bin 5m

I actually called it SyncIPv4.bin

You can call the script whatever you want. Notice anyway that it does not deal with IPv4 and that it is not a binary!

Reply via email to