Closed hydrapolic closed 9 years ago
Great, so yet another incompatibility between a BSD and a GNU userland :/
It seem's both BSD's and GNU's fmt(1)
support the -w
option, so that's probably the way to go. GNU's version will then set the goal width automatically (yay), BSD's will not. The outcome will probably be that help output doesn't look as nice on OS X.
Thanks, works fine.
While trying to run the current master I get:
$ ./google-font-download ./google-font-download: Error: No font families given
fmt: cannot open '311' for reading: No such file or directory fmt: cannot open '319' for reading: No such file or directory
What exactly is the meaning of:
usage() { cols=$(tput cols) || cols=80 fmt $(( cols - 8 )) $cols >&2 <<-EOF
As I check the man page of fmt: SYNOPSIS fmt [-WIDTH] [OPTION]... [FILE]...
DESCRIPTION Reformat each paragraph in the FILE(s), writing to standard output. The option -WIDTH is an abbreviated form of --width=DIGITS.
Something like this works for me: fmt --width=$(( cols - 8 )) >&2 <<-EOF
I'm using Coreutils 8.24.