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

35577Re: difference

Expand Messages
  • John Culleton
    Jan 2, 2003
    • 0 Attachment
      On Thursday 02 January 2003 04:08, Payal Rathod wrote:
      > Hi all,
      > I have 2 problems.
      >
      > 1. I have 2 files foo and bar with a word on each line.
      > foo -> 5000 words
      > bar -> 2300 words.
      > Now I want to *find all the words in bar that are missing in foo* and
      > put them in 3rd file foo.bar.
      > ( So, foo.bar will have a maximum of 2300 words. )
      > (both the files are sorted)
      > Please remember I don't want words unique to file foo. I want words
      > in bar which are not in foo.
      >
      > 2. In another file, I have few lines seperated by a single tab. Now I
      > want to delete all the lines ( and NOT just the tab ) which start
      > with a tab. I tried :1,$/^^I/d but managed to delete just one line at
      > a time. Can someone help me on this?
      >
      > Thanks a lot for the help in advance and bye.
      > With warm regards,
      > -Payal

      1. If you have a *nix machine I would use the standard utilities, such
      as
      diff, uniq, sort and so on in some combination. I do this all the time
      in similar problems. I wouldn't use Vim.

      2. Don't know :-)

      John Culleton
      Able Indexers and Typesetters
      Rowse Reviews
      Culleton Editorial Services
      http://wexfordpress.com
    • Show all 5 messages in this topic