Available in

(1) (1)/de (1)/fi (1)/hu (1)/ja (1)/pl (1b) (1posix)

TOC

SED(1)                                                                  SED(1)



sed -

sed [-n] [-V] [--quiet] [--silent] [--version] [--help]

           [-e script] [--expression=script]
           [-f script-file] [--file=script-file]
           [script-if-no-other-script]
           [file...]

sed
       ()

       sed
        (ed )

       sed  1
        sed



sed
       -V

       --version
              sed

       -h

       --help


       -n

       --quiet

       --silent

              sed

              p

              sed

       -e script

       --expression=script
              script


       -f script-file

       --file=script-file

              script-file


       -e, -f, --expression, --file


       script




       -




 sed
        sed
        (texinfo )


       : label
              b

              t


       #comment
               ( -e )

       }      { }

   0 1
       =

       a \

       text   text

              text


       i \

       text   text

              text


       q       sed
               auto-print  diable


       r filename

              filename



       {       (} )

       b label
              label

              label


       t label
               t s/// label

              label


       c \

       text    text

              text


       d


       D




       h H    /

       g G    /

       x

       l

       n N    /

       p

       P

       s/regexp/replacement/

              regexp


              replacement

              replacement

              &

               \1  \9

              regexp
               (sub-expression)

       w filename

              filename


       y/source/dest/

              source

              dest


sed
       2 2  ()

        3

       addr1,addr2
        () addr1

       addr2

       addr2

       regexp () addr1

       addr2


        () !
        ()



       number number


       first~step
              first

              step
               ``sed -n 1~2p''
               2~5
               2  5  ( GNU )

       $

       /regexp/

              regexp


       \cregexpc

              regexp


              c


POSIX.2 BRE

       \n

       GNU [:

       ]

 sed
       replacement
        (y) source

       dest

       \<newline>


awk(1),
       ed(1),  expr(1),  emacs(1),  perl(1),  tr(1),  vi(1), regex(5) [] : LDP
       regex(7) , sed.info, sed , the sed FAQ
       (http://www.wollery.demon.co.uk/sedtut10.txt,
       http://www.ptug.org/sed/sedfaq.htm).



       bug-gnu-utils [AT] gnu.org
       Subject: sed



GNU Project                       1998-05-07                            SED(1)

COMMENTS

1
See http://wiki.splitbrain.org/she … r_mark_bom on how to use SED to strip UTF-8 byte order marks.
2005-12-04 00:43:25
Andi
2
Real nice oneliners and longer SED scripts: http://sed.sourceforge.net/grabbag/
2005-12-07 16:16:30
Andi
Add your comment here. Whitespace and linebreaks are preserved. URLs are linked automatically.
CAPTCHA

No HTML allowed. URLs will be linked with nofollow attribute. Whitespace is preserved.