Re: crontab(1) using stdin

наб <[email protected]>
Newsgroups gmane.os.netbsd.devel.userlevel
Message-ID <q2pxxf2jv42trd53f3vu6n6656i2oxsne4p4pefirzq52mru7j@tarta.nabijaczleweli.xyz>
On Wed, Oct 30, 2024 at 06:29:57PM +0100, Edgar Fuß wrote:
> > If NetBSD "crontab" errors with 
> > "use crontab - to replace your crontab from the standard input stream"
> > then that's an improvement over both the standard and the status quo IMO
> While I agree that what POSIX demands is not ideal, NetBSD's crontab(1) 
> behaviour prevents me from writing portable scripts.
Here more than ever, "better" doesn't mean "right" unfortunately.

You can still write this portably:
  echo crontab > ./-
  crontab - < -
  rm -
unideal, sure, but.
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEfWlHToQCjFzAxEFjvP0LAY0mWPEFAmcib8wACgkQvP0LAY0m
WPFG1A//WDJBg5ycB58pXUTzA9Cv3yQZV5VUqJycPaNKndwK2VcmbaoyWjrr+GIC
xFu81REJRu/791CroXkEDgP6dlzQjQLFEOe6d4xSJFzBcbhAmM2Rd+n+dvlvsyNj
P3OEjdKYfJRXbJ22Thf9AT4OpGh2yVMAsQviIr67HDgWlF/bOTR6nkUovaa008vr
Jxvc6k5zKfK8PargghezNeQmB/AUKHAiKNPbPv5WNy7CATEdd3asjEzaU6v9jRKw
Aji+7BVgdloPN98MaYV1/OEe5RhzFEz3m54l2URAqY5KAapIOg2UnEs7gn1inEA7
OyJRmQotygmUfFVboyQIBhGr4nEZFYpI5RZn86A/bto03YB7/mRD+0TIq1QRq4Kj
60N7ZL0c8vz0KoAXvWcvMqocgaG/sHq8A1ox/TcpWGjleh2sj30uRkusD4OuAa9F
T7o/ezP79VN+zcpqwIkOu1xCsta5Mt3gps1xAa7JrCLYHxvow69nAf7nLhZBsXQF
LeuG5K7VDMZzxBHtW9u7dxs1qmO50ACqdj8E/gKmT0N4iZ4sqfuvhBZ7vO9m2vFA
zq2bHfS7+nHWyLdF06iZZzUW/9cRX8/V/ho83QL3lchYkmE1c8UMxXj28paTBGUc
EkGf7y8jYvaAykanevIBf1xbPXsoP/iX/S6/GHIxxXA9ECPY17g=
=9Ha2
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.