Re: need help with sed



Hello Guillaume,


On Mon, 30 Jun 2008 13:58:29 +0200 Guillaume <guillaume.chardin@xxxxxxxxx> wrote:

Hi,

When I run this command:
echo 2008:04:23 | sed 's/://'
The result is
200804:23

I expect to have this :
20080423

What is wrong with my very simple regexp ':' why all occurence of the
char ':' are not deleted ?

its make me crazy, can someone help me ?

Thanks

For this exact same purpose - removing all occurrences of some specific
char(s) - you could have used `tr`, like in:

# echo 2008:04:23 | tr -d :


Regards,

--
wwp

Attachment: signature.asc
Description: PGP signature

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

Relevant Pages

  • Re: which program and modification
    ... I recently updated my 'witch' shell script to ksh93, ... # witch locates all occurrences of file on the search PATH (with ... $SCRIPT - locate all occurrences of a command ... # Process command line arguments ...
    (comp.unix.programmer)
  • Re: sed command fails if line has quote
    ... I might have forgotten to escape certain ... You have a regexp: ... A systemcommand: ... But than you have a script that depends on external commands and so it ...
    (comp.lang.php)
  • Re: rm + stdin
    ... Steffan wrote: ... Thmm. ... It is a regexp that is supposed to find files in that directory that match that regexp. ... Just because you use it elsewhere, doesn't mean there are any such files there: the output of a command like 'ls', with that argument, will output nothing to stdout if there are no such files, and simply report exactly that sort of error if to stderr. ...
    (linux.redhat)
  • Re: regexp
    ... > the regexp function that I don't understand. ... result of the command is substituted into the if command as ... evaluated to determine whether to execute the body. ... Tcl syntax is ...
    (comp.lang.tcl)
  • Re: F10: sound vanishing after some time (Dell E6500)
    ... wwp wrote: ... BTW, when I kill pulseaudio using the command you gave, main.c says it's not ...
    (Fedora)