The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1866 
====================================================================== 
Reported By:                steffen
Assigned To:                
====================================================================== 
Project:                    1003.1(2024)/Issue8
Issue ID:                   1866
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       steffen 
Organization:                
User Reference:              
Section:                    crontab 
Page Number:                2749 ff. 
Line Number:                90909 ff. 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-10-31 00:28 UTC
Last Modified:              2024-10-31 00:28 UTC
====================================================================== 
Summary:                    crontab: does not support Utility Syntax Guideline
13
Description: 
On a NetBSD i stumbled over an experienced user failing to write portable
crontab scripts because POSIX crontab does not support guideline 13 which
says:

  For utilities that use operands to represent files to be opened for
either reading
  or writing, the '−' operand should be used to mean only standard input
(or
  standard output when it is clear from context that an output file is
being
  specified) or a file named −.

Looking around we see:

<code>
# dcron (Linux plus)
$ crontab --help
crontab 4.5
crontab file [-u user]  replace crontab from file
crontab -  [-u user]    replace crontab from stdin
...

# busybox
$ busybox.static crontab --help
BusyBox v1.37.0.git (2024-04-20 23:25:28 CEST) multi-call binary.

Usage: crontab [-c DIR] [-u USER] [-ler]|[FILE]
...
        FILE    Replace crontab by FILE ('-': stdin)

# OpenBSD
#?128|kent:open-src.git$ git show
origin/master:usr.sbin/cron/crontab.1|mandoc|v
     crontab [-u user] file
     crontab [-e | -l | -r] [-u user]

     The first form of this command is used to install a new crontab from
some
     named file, or standard input if the pseudo-filename ‘-’ is
given.

# NetBSD
#?0|kent:net-src.git$ git show
origin/trunk:external/bsd/cron/dist/crontab.1|mandoc|v

     crontab [-u user]
     crontab [-elr]
#
     The first form of this command is used to install a new crontab from
some
     named file or standard input if the pseudo-filename “-” is given.

# FreeBSD

#?128|kent:free-src.git$ git show
origin/main:usr.sbin/cron/crontab/crontab.1|mandoc|v

     crontab [-u user] file
     crontab [-u user] { -l | -r [-f] | -e }
     The first form of this command is used to install a new crontab from
some
     named file or standard input if the pseudo-filename ‘-’ is given.

# (ditto DragonFlyBSD)
</code>

So that looks good.
Solaris aka OpenIndiana 2024 not:

<code>
#?0|oi-2024:steffen$ crontab
^C#?1|oi-2024:steffen$ crontab -
crontab: can't open your crontab file.
</code>

But implementation should be trivial i would think.  (Or replacing with
dcrond.)
Desired Action: 
Please support Utility Syntax Guideline for crontab.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-10-31 00:28 steffen        New Issue                                    
2024-10-31 00:28 steffen        Name                      => steffen         
2024-10-31 00:28 steffen        Section                   => crontab         
2024-10-31 00:28 steffen        Page Number               => 2749 ff.        
2024-10-31 00:28 steffen        Line Number               => 90909 ff.       
======================================================================


  • [1003.1(20... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group

Reply via email to