View Single Post
Old 04-07-2006, 04:49 AM  
Too much time...
Join Date: Jul 2003
Posts: 1,430

If you have perl installed, you can use something like
perl -e "while (<>) {$_ =~ s/^User Name: .*$/User Name: yourusername/; $_ =~ s/^Password: .*$/Password: yourpass/; print $_}" importfile.txt >exportfile.txt
This will edit all the "User Name:" and "Password:" lines to write "yourusername" and "yourpass" (don't forget to edit the latest two).

Whatever language your forum is using (most probably PHP or perl), you can use similar regexps to generate the file dynamically from a single template. You only need to use variables instead of fixed usernames and passwords. Note that this means you have to store usernames/passwords somewhere on your forum/website/database.
Harm is offline