Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010

    Unanswered: Filter rows in sql file

    I have a 50000 line(ish) set of records in a file. I have another file where I have filtered out all the line numbers for those which have an error of various types. e.g column count, field type etc. I want to get all those lines into a separate file so I can sanitise them. There are abt 3-4000 of them.

    How can I access those lines which I want to isolate into a single file?

    I have all the usual linux stuff available and a bit of understanding of regexps.

  2. #2
    Join Date
    Jun 2007
    This doesn't appear to be a MySQL issue so unless you object I'll move it to the Unix forum. You want to be looking at the grep command though. You haven't given any examples of what text you want to look for so I can't be any more specific than:

    grep "Error" MyOriginalFile.txt > JustTheErrors.txt
    You'd run this command at the linux command prompt.


  3. #3
    Join Date
    Feb 2010
    Thanks, and that does help. I don't mind the tfr either :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts