home | list info | list archive | date index | thread index

Re: [OCLUG-Tech] least: bash pager hack


>>     cat "$@" | least
>
>
> I specifically did not use quotes around the $@ passed to cat so that
> least would work with multiple arguments.  Will an unquoted $@ cause me
> problems when filenames contains spcaes?

Yes, the spaces will separate words if $@ is not quoted. But "$@" will work with multiple arguments - each argument becomes a word (this is the difference from "$*", which combines all the arguments into a single word).

>> start="$(head -$(($LINES + 1)))"
>
>
> IIRC, newer versions of 'head' don't support -<cont> so -n<count> is
> required.

Yup.  I keep getting caught by that.