Date: Sun, 18 Sep 2022 09:59:47 -0700 From: paul beard <paulbeard@gmail.com> To: paul beard <paulbeard@gmail.com>, FreeBSD-questions <freebsd-questions@freebsd.org> Subject: Re: command works interactively but not in cron? Message-ID: <CAMtcK2rrKc%2BtB2FjHVcOMU2_h-FdkrD7s8HZcHY94bGdYetv=A@mail.gmail.com> In-Reply-To: <YydNjbA/eEcM%2Bc3l@harpo.local> References: <CAMtcK2oLAopL9rO4SzJxzL30FpJ0YjrmybajQ6LJzeehNzKnGA@mail.gmail.com> <YydNjbA/eEcM%2Bc3l@harpo.local>
next in thread | previous in thread | raw e-mail | index | archive | help
--00000000000070249405e8f686fc Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable RTFM=E2=80=A6I should remember to do that more often. Thanks. On Sun, Sep 18, 2022 at 9:55 AM Kusalananda K=C3=A4h=C3=A4ri <andreas.kahar= i@abc.se> wrote: > On Sun, Sep 18, 2022 at 08:49:05AM -0700, paul beard wrote: > > /usr/sbin/pkg query %o works fine interactively but if I use it to > backup a > > list of installed pkgs in crontab, it fails: > > > > 00 4 * * * /usr/sbin/pkg query %o > /var/backups/installed.pkgs > > > > Usage: pkg query <query-format> <pkg-name> > > pkg query [-a] <query-format> > > pkg query -F <pkg-name> <query-format> > > pkg query -e <evaluation> <query-format> > > pkg query [-Cgix] <query-format> <pattern> <...> > > > > For more information see 'pkg help query.' > > > > What am I missing here? > > -- > > Paul Beard / www.paulbeard.org/ > > Escape the % > > 0 4 * * * /usr/sbin/pkg query \%o >/var/backups/installed.pkgs > > See also crontab(5) > > -- > Andreas (Kusalananda) K=C3=A4h=C3=A4ri > SciLifeLab, NBIS, ICM > Uppsala University, Sweden > > . > --=20 Paul Beard / www.paulbeard.org/ --00000000000070249405e8f686fc Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">RTFM=E2=80=A6I should remember=C2=A0to do that more often.= =C2=A0<div><br></div><div>Thanks.=C2=A0</div></div><br><div class=3D"gmail_= quote"><div dir=3D"ltr" class=3D"gmail_attr">On Sun, Sep 18, 2022 at 9:55 A= M Kusalananda K=C3=A4h=C3=A4ri <<a href=3D"mailto:andreas.kahari@abc.se"= >andreas.kahari@abc.se</a>> wrote:<br></div><blockquote class=3D"gmail_q= uote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-s= tyle:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On Sun, Sep= 18, 2022 at 08:49:05AM -0700, paul beard wrote:<br> > /usr/sbin/pkg query %o works fine interactively but if I use it to bac= kup a<br> > list of installed pkgs in crontab, it fails:<br> > <br> > 00 4 * * *=C2=A0 =C2=A0 =C2=A0 /usr/sbin/pkg query %o > /var/backup= s/installed.pkgs<br> > <br> > Usage: pkg query <query-format> <pkg-name><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 pkg query [-a] <query-format><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 pkg query -F <pkg-name> <query-for= mat><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 pkg query -e <evaluation> <query-f= ormat><br> >=C2=A0 =C2=A0 =C2=A0 =C2=A0 pkg query [-Cgix] <query-format> <= pattern> <...><br> > <br> > For more information see 'pkg help query.'<br> > <br> > What am I missing here?<br> > -- <br> > Paul Beard / <a href=3D"http://www.paulbeard.org/" rel=3D"noreferrer" = target=3D"_blank">www.paulbeard.org/</a><br> <br> Escape the %<br> <br> =C2=A0 =C2=A0 =C2=A0 =C2=A0 0 4 * * * /usr/sbin/pkg query \%o >/var/back= ups/installed.pkgs<br> <br> See also crontab(5)<br> <br> -- <br> Andreas (Kusalananda) K=C3=A4h=C3=A4ri<br> SciLifeLab, NBIS, ICM<br> Uppsala University, Sweden<br> <br> .<br> </blockquote></div><br clear=3D"all"><div><br></div>-- <br><div dir=3D"ltr"= class=3D"gmail_signature">Paul Beard / <a href=3D"http://www.paulbeard.org= /" target=3D"_blank">www.paulbeard.org/</a><br></div> --00000000000070249405e8f686fc--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMtcK2rrKc%2BtB2FjHVcOMU2_h-FdkrD7s8HZcHY94bGdYetv=A>