Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>A few warnings and additions to what everyone else has already said:</p> <ol> <li>The <code>-r</code> option is a GNU extension to enable extended regular expressions. BSD derived sed's use <code>-E</code> instead.</li> <li><a href="http://www.opengroup.org/onlinepubs/000095399/utilities/sed.html#tag_04_126_13_02" rel="noreferrer">Sed</a> and <a href="http://www.opengroup.org/onlinepubs/000095399/utilities/grep.html" rel="noreferrer">Grep</a> use <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html#tag_09_03" rel="noreferrer">Basic Regular Expressions</a></li> <li><a href="http://www.opengroup.org/onlinepubs/000095399/utilities/awk.html#tag_04_06_13_04" rel="noreferrer">Awk</a> uses <a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap09.html#tag_09_04" rel="noreferrer">Extended Regular Expressions</a></li> <li>You should become comfortable with the <a href="http://www.opengroup.org/pubs/catalog/un.htm" rel="noreferrer">POSIX specifications</a> such as <a href="http://www.opengroup.org/onlinepubs/009695399/toc.htm" rel="noreferrer">IEEE Std 1003.1</a> if you want to write portable scripts, makefiles, etc.</li> </ol> <p>I would recommend rewriting the expression as</p> <pre><code>'s/\([a-zA-Z0-9.]\{1,\}\) [0-9] \(.*\)/\2 (\1)/g' </code></pre> <p>which should do exactly what you want in any POSIX compliant <code>sed</code>. If you do indeed care about such things, consider defining the <a href="http://www.wlug.org.nz/POSIXLY_CORRECT" rel="noreferrer"><code>POSIXLY_CORRECT</code></a> environment variable.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload