On Fri, May 17, 2024 at 12:43:49PM +0700, Max Nikulin wrote: > On 17/05/2024 10:16, Karl Vogel wrote: > > https://github.com/aaronsw/html2text/ might interest you. It converts > > (relatively) sane HTML into Markdown. > > > > I put html2text.py into $HOME/lib and use this to call it: > > > > #!/bin/sh > > #<html2mkd: convert reasonable HTML to Markdown > > exec /usr/bin/env python $HOME/lib/html2text.py ${1+"$@"} > > exit 1 > > I am puzzled by this wrapper. I expect that "$@" is enough here and namely > {1+"$@"} is redundant. Am I wrong?
https://mywiki.wooledge.org/WrapperScript Short version: "$@" is good enough if your /bin/sh isn't museum-era. ${1+"$@"} works around a bug in some very old shells.