[mythtv-users] mythconverg_restore.pl duplicate entry error

Steven Adeff adeffs.mythtv at gmail.com
Thu Jun 3 22:00:08 UTC 2010


On Thu, Jun 3, 2010 at 5:50 PM, Keith Edmunds <kae at midnighthax.com> wrote:
> On Thu, 3 Jun 2010 17:45:04 -0400, adeffs.mythtv at gmail.com said:
>
>> I imagine I can use sed to remove a specific line
>
> $ sed --in-place=.bak -e "245d" dumpfile
>
> ....will delete line 245 from dumpfile preserving the original in
> dumpfile.bak

awesome, thanks for the help Keith! I got the dump loaded and things
seem to be working fine!

as a note to future users with a similar issue, I found basically the
same thing Keith wrote about sed at:
http://en.kioskea.net/faq/1451-sed-delete-one-or-more-lines-from-a-file

Removing one (or several) line (s) of a file
Syntax:
sed '{[/]<n>|<string>|<regex>[/]}d' <fileName>
sed '{[/]<adr1>[,<adr2>][/]d' <fileName>

    * /.../=delimiters
    * n = line number
    * string = string found in in line
    * regex = regular expression corresponding to the searched pattern
    * addr = address of a line (number or pattern )
    * d = delete

Examples
Remove the 3rd line:
sed '3d' fileName.txt


-- 
Steve
http://www.mythtv.org/wiki/User:Steveadeff
Before you ask, read the FAQ!
http://www.mythtv.org/wiki/index.php/Frequently_Asked_Questions
then search the Wiki, and this list,
http://www.gossamer-threads.com/lists/mythtv/
Mailinglist etiquette -
http://www.mythtv.org/wiki/index.php/Mailing_List_etiquette


More information about the mythtv-users mailing list