Bug #613

sed usage missing newline

Added by Garrett D'Amore over 3 years ago. Updated about 3 years ago.

Status:Resolved Start date:2011-01-08
Priority:Low Due date:
Assignee:Damian Wojslaw % Done:

100%

Category:cmd - userland programs Spent time: -
Target version:-
Difficulty:Medium Tags:needs-triage

Description

This was pointed out separately to me:

garrett@thinkpad{1}> sed h
sed: illegal option -
h
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]garrett@thinkpad{2}>

(It is subtle on an 80 column terminal).

I think the last ... could have the leading space removed to fit better in 80 columns as well.

webrev-613.zip (72.5 kB) Damian Wojslaw, 01/26/2011 09:58 am

illumos-gate.patch (770 Bytes) Damian Wojslaw, 01/27/2011 12:40 pm

illumos-gate.patch (772 Bytes) Damian Wojslaw, 01/31/2011 10:15 am

History

Updated by Damian Wojslaw about 3 years ago

  • Assignee set to Damian Wojslaw

Updated by Damian Wojslaw about 3 years ago

  • % Done changed from 0 to 80

Output from modified sed:

illumos-gate/usr/src/cmd/sed$ ./sed -h
usage: sed script [-Ealn] [-i extension] [file...]
       sed [-Ealn] [-i extension] [-e script]... [-f script_file]... [file...]

hg -v outgoing

running ssh hg@hg.illumos.org "hg -R illumos-gate serve --stdio" 
comparing with ssh://hg@hg.illumos.org/illumos-gate
searching for changes

changeset:   13274:e2301f269649
tag:         tip
user:        Damian Wojslaw <trochej@madtower.local>
date:        Tue Jan 25 21:16:42 2011 +0100

description:
    613 sed usage missing newline
        Reviewed by:
        Approved by:

modified:
   usr/src/cmd/sed/main.c

hg pbchk

CDDL block check:

Copyright check:
usr/src/cmd/sed/main.c: no copyright message found

C style check:

Header format check:

Java style check:

Mapfile comment check:

File permission check:

Keywords check:

Comments check:
These comments are neither bug nor ARC case:
  613 sed usage missing newline

Checking for new tags:

Checking for multiple heads (or branches):

Checking for branch changes:

RTI check:

Checking for uncommitted changes:

Checking for merges:

Webrev at: [[http://cr.illumos.org/view/wsbsmj0e/]]

Updated by Damian Wojslaw about 3 years ago

hg pbchk

CDDL block check:

Copyright check:
usr/src/cmd/sed/main.c: no copyright message found

C style check:

Header format check:

Java style check:

Mapfile comment check:

File permission check:

Keywords check:

Comments check:
These comments are neither bug nor ARC case:
  613 sed usage missing newline
      Reviewed by: jason.brian.king@gmail.com
      Reviewed by: gwr@nexenta.com
      Approved by:

Checking for new tags:

Checking for multiple heads (or branches):

Checking for branch changes:

RTI check:

Checking for uncommitted changes:

Checking for merges:

hg -v outgoing

running ssh hg@hg.illumos.org "hg -R illumos-gate serve --stdio" 
comparing with ssh://hg@hg.illumos.org/illumos-gate
searching for changes

changeset:   13275:ec0845ee3027
tag:         tip
user:        Damian Wojslaw <damian@wojslaw.pl>
date:        Wed Jan 26 18:53:02 2011 +0100

description:
    613 sed usage missing newline
        Reviewed by: jason.brian.king@gmail.com
        Reviewed by: gwr@nexenta.com
        Approved by:

modified:
   usr/src/cmd/sed/main.c

Webrev at: [[http://cr.illumos.org/view/gkfucifw/]]

Updated by Damian Wojslaw about 3 years ago

Usage output:

/usr/bin/sed -h
usage: sed script [-Ealn] [-i extension] [file...]
       sed [-Ealn] [-i extension] [-e script]... [-f script_file]... [file...]

hg -v outgoing

running ssh hg@hg.illumos.org "hg -R illumos-gate serve --stdio" 
comparing with ssh://hg@hg.illumos.org/illumos-gate
searching for changes

changeset:   13275:3176af77db88
tag:         tip
user:        Damian Wojslaw <damian@wojslaw.pl>
date:        Thu Jan 27 21:32:00 2011 +0100

description:
    613 sed usage missing newline
    Reviewed by: jason.brian.king@gmail.com
    Reviewed by: gwr@nexenta.com
    Reviewed by: garrett@nexenta.com

modified:
   usr/src/cmd/sed/main.c

hg pbchk

Copyright check:
usr/src/cmd/sed/main.c: no copyright claim for current year found

C style check:

Header format check:

Java style check:

Mapfile comment check:

File permission check:

Keywords check:

Comments check:

Checking for new tags:

Checking for multiple heads (or branches):

Checking for branch changes:

Checking for uncommitted changes:

Checking for merges:

Webrev: http://cr.illumos.org/view/ehytg8mf/

Patch attached

Updated by Damian Wojslaw about 3 years ago

/usr/bin/sed -h

/usr/bin/sed: illegal option -- h
usage: sed script [-Ealn] [-i extension] [file...]
       sed [-Ealn] [-i extension] [-e script]... [-f script_file]... [file...]

Webrev available at:
http://cr.illumos.org/view/1yfq8ce3/

Patch attached

Updated by Garrett D'Amore about 3 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 80 to 100

I've pushed this -- without the "h" addition to getopt, as noted in IRC.

garrett@thinkpad{27}> hg head
changeset: 13277:6e9c2509dda5
tag: tip
user: Damian Wojslaw <>
date: Mon Jan 31 15:13:01 2011 -0800
description:
613 sed usage missing newline
Reviewed by:
Reviewed by:
Reviewed by:
Approved by:

Also available in: Atom PDF