Re: sed problem


Subject: Re: sed problem
From: Peter Q. Olsson (olsson@koyukuk.at.uaa.alaska.edu)
Date: Fri Jun 28 2002 - 11:07:47 AKDT


Try the perl solution:

perl -pe 's|DISABLE KEYS \*/;|DISABLE KEYS \*/|' my_old_file > my_filtered_file

It worked for me (famous last words)

PQO

>>I got a huge (1.8G) mysql dump file that has several lines of:
>/*!40000 ALTER TABLE ID_numbers DISABLE KEYS */;
>I need to remove that erroneous trailing ; character on each of the lines.
>I tried:
>sed -e 's/DISABLE KEYS *\/;/DISABLE KEYS *\//g' 06-26-02_dump.sql > new.sql
>and then it thinks for a while ... and then it finishes, but new.sql *still*
has the ; character
>at the end of those lines.
>Anyone know how to get this to work?
>
>- Cisco Serret
>
>__________________________________________________
>Do You Yahoo!?
>Yahoo! - Official partner of 2002 FIFA World Cup
>http://fifaworldcup.yahoo.com
>
>---------
>To unsubscribe, send email to <aklug-request@aklug.org>
>with 'unsubscribe' in the message body.
>

    __________________________________________________________________
   | |
   | Dr. Peter Q. Olsson, |
   | Chief Scientist, Alaska Experimental Forecast Facility |
   | University of Alaska Anchorage |
   | 2811 Merrill Field Drive |
   | Anchorage, AK 99501 |
   | voice: (907) 264-7449 |
   | fax : (907) 264-7444 |
   | olsson@aeff.at.uaa.alaska.edu |
   |__________________________________________________________________|

---------
To unsubscribe, send email to <aklug-request@aklug.org>
with 'unsubscribe' in the message body.



This archive was generated by hypermail 2a23 : Fri Jun 28 2002 - 11:09:24 AKDT