On Sun, Jul 24, 2011 at 02:09:54PM +0100, Connor Lane Smith wrote: > On 24 July 2011 06:34, Dave Reisner <d...@falconindy.com> wrote: > > if [ "$path" -nt "$CACHE" ]; then > > 'test -nt' is non-portable. I think you've just discovered why we use > the 'ls -dt' hack.
Hrmmph, so it is... the doc I had on hand lied to me. > I agree that dmenu_run isn't the nicest script in existence. But > because of the tedious limitations of POSIX we don't have much choice. There's always a choice. Consider using find, then: IFS=: if test -n "`find $PATH -type d -prune -newer "$CACHE"`"; then # regen the cache fi http://pubs.opengroup.org/onlinepubs/009604599/utilities/find.html > On 24 July 2011 13:13, lolilolicon <loliloli...@gmail.com> wrote: > > cmd=`dmenu "$@" < "$CACHE"` || exit $? > > exec sh -c "$cmd" > > This could work, I think. I'll check it out. > > Thanks, > cls >