?

Log in

No account? Create an account
Linux Community's Journal
 
[Most Recent Entries] [Calendar View] [Friends View]

Sunday, January 4th, 2004

Time Event
1:39a
Batch find/replace with multi-byte character text files
Okay, so as a follow-up to my previous post about openoffice, I now have a question about command-line find/replace.

I have two files: a large text file (actually an unzipped OpenOffice file), and a list of Japanese terms and their translations. Many of said Japanese terms are multiple lines, and some have special characters like /, (, ), #, etc. I need a way to search and replace for every term on the list in said text file (actually, there are nine text files, but because of other complexities I have to deal with them one at a time).

I understand there might not be a silver bullet, but both the text file and the list of terms is long enough that I am considering writing a C program to do the job -there MUST be an easier way. Please advise. Any suggestions whatsoever are welcome.

The important part of the question is how to search and replace terms with multiple lines and special characters; if absolutely necessary I can mangle the list of terms so that each line is a perl or sed command, and run the entire thing as a shell script.
10:34a
Routing Table Goodness
After struggling with the newest nvidia drivers, I had decided to downgrade to the previous version.

My routing table had other plans. After a couple of times trying to resolve the hostnames of various ftp servers from which I get my packages, I thought perhaps the University's DNS servers were getting hit with yet another DDoS attack, however upon booting into Windows XP (kept on my desktop for dire emergencies such as this) I found that such was not the case. Everything worked fine in Windows, so perhaps something got goofed in my routing table.

So I boot into Linux again and type "route". It hangs for awhile, so I stop it and check my ifconfig. Everything is fine there. I type route again, it hangs for awhile, but I decide to let it go. After about 30 seconds per line, it spits out routes for loopback and the two local networks here (I have two NICs, one with a private IP for the private network, one with a public IP for accessing everything else). The rest of the table is borked. No 0.0.0.0 route, and I have no idea how it died. I didn't do anything except disable gdm from starting on bootup so my shiny new nvidia drivers wouldn't cause the screen to black out. And since I didn't write down what my normal routing table looked like (because I figured it would never spontaneously die like this), I have no clue what my 0.0.0.0 route looked like, and I haven't a clue how to get back my normal routes.

Any suggestions (or magic spells) that can help me get back my kernel IP routing table and save me from using Windows XP? Seriously guys, I miss my virtual desktops. :'(

Current Mood: sad

<< Previous Day 2004/01/04
[Calendar]
Next Day >>
About LiveJournal.com