On Tue, 2018-04-03 at 18:48 +0900, Hideki Yamane wrote: > On Tue, 3 Apr 2018 11:20:43 +0200 > Raphael Hertzog <email@example.com> wrote: > > In most postinst snippets, it is used like this: > > > > if which apt-config >/dev/null 2>&1; then > > > > I don't see the need for a sub-shell. > > I've tried which command on NetBSD, it failed. So just check "test -e" > for /usr/bin/apt-config as below. [...] The portable way to look for a command, without running it or hardcoding the directory, is 'command -v'. Ben. -- Ben Hutchings Anthony's Law of Force: Don't force it, get a larger hammer.
Description: This is a digitally signed message part