Loading ...
Sorry, an error occurred while loading the content.

the files can not open

Expand Messages
  • 萧礼
    Hi everyone , tonight I found something puzzled. I use the command sentence :sed s/Too/Too much/w a.txt quote.txt to deal with quote.txt file ;
    Message 1 of 2 , Apr 14, 2012
    • 0 Attachment

      Hi   everyone , tonight  I found something puzzled.
      I  use  the command sentence :sed   's/Too/Too much/w  >> a.txt'   quote.txt
      to deal  with quote.txt file ;
      at  last  there a file with name ">>a.txt" ;
      so  I  want  to  open it to see   what  is in  it.
      but  i  can  not  open;

      thanks  for  anyone's  help.

      --

      青春年少,正直一马奔腾.........


      --
      You received this message from the "vim_use" maillist.
      Do not top-post! Type your reply below the text you are replying to.
      For more information, visit http://www.vim.org/maillist.php
    • Tim Chase
      ... I think you d have to explicitly copy what you typed; where you typed it; what you got back; and what you want it to do. Vim doesn t have a :sed
      Message 2 of 2 , Apr 14, 2012
      • 0 Attachment
        > Hi everyone , tonight I found something puzzled.
        > I use the command sentence :sed 's/Too/Too much/w>> a.txt'
        > quote.txt
        > to deal with quote.txt file ;
        > at last there a file with name ">>a.txt" ;
        > so I want to open it to see what is in it.
        > but i can not open;

        I think you'd have to explicitly copy what you typed; where you
        typed it; what you got back; and what you want it to do. Vim
        doesn't have a ":sed" command. Possibilities are that you want
        to issue

        :e quote.txt
        :g/Too/s//Too much/|.w >> a.txt

        or perhaps

        :e quote.txt
        :w !sed 's/Too/Too much/;w a.txt'

        or possibly

        :! sed 's/Too/Too much/' quote.txt >>a.txt

        (that last one is the same as just executing that command on the
        command-line)

        which you can read about at

        :help :w_c
        :h :w_a

        If you give a clearer picture of what you want to do (and why you
        want to bring sed into the picture instead of doing everything in
        vim), other solutions might manifest.

        -tim


        --
        You received this message from the "vim_use" maillist.
        Do not top-post! Type your reply below the text you are replying to.
        For more information, visit http://www.vim.org/maillist.php
      Your message has been successfully submitted and would be delivered to recipients shortly.