#19487: Support .zip upstream/ files
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  ncohen                 |       Status:  needs_review
           Type:         |    Milestone:  sage-6.10
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:
  distribution           |  Work issues:
       Keywords:         |       Commit:
        Authors:         |  7e464c1a8bf37422e30b36f5b99ff6a7748e6606
  Nathann Cohen          |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  u/mkoeppe/19487        |
   Dependencies:         |
  #19484                 |
-------------------------+-------------------------------------------------

Comment (by jhpalmieri):

 Your command works but is probably not what we want. The regular
 expression `[\.zip|\.tar|\.gz]*` matches any string formed by the
 characters between the brackets, so it is equivalent to `[\.ziptarg|]*`.
 So I think it matches too much: the `sed` invocation would convert
 `whatever.tar.2.0.zig.zag.rat` to `whatever.tar.2.0`. This was mkoeppe's
 comment about confusing `[]` with `\(\)`.

 On OS X,
 {{{
 echo whatever.tar.2.0.zip.tar.gz.tar.tgz | sed -E
 "s/(\.zip|\.tar|\.gz|\.tgz)*$//g"
 }}}
 works, while omitting `-E`
 {{{
 echo whatever.tar.2.0.zip.tar.gz.tar.tgz | sed
 "s/(\.zip|\.tar|\.gz|\.tgz)*$//g"
 }}}
 does not.

--
Ticket URL: <http://trac.sagemath.org/ticket/19487#comment:28>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to