Page 1 of 1

duplicated lines in usage() or help files

Posted: 2017-10-13T10:56:48-07:00
by TedBaker
On my machine a a few of the scripts generate duplicate lines when help is printed out:

this can be fixed by adding a -n to the sed command that generates the help output

e.g.

sed >&2 -n -e '1,/^####/d; /^######/g; /^#/!q; s/^#*//; s/^ //; 4,$p' "$PROGDIR/$PROGNAME"

this affects multicrop and innercrop

Re: duplicated lines in usage() or help files

Posted: 2017-10-13T11:10:34-07:00
by fmw42
All my scripts have the same code. It only happens on certain Linux systems. For example not on my Mac. I have seen several variations that fix this, but some cause it to break on my Mac. So right now I have no universal solution. Furthermore, it would mean manually changing over 300 scripts. So at this time, each person will have to make modifications, if this is important. See Pointer 13 on my home page about other solutions to the same issue. I will add your solution to the list there.