Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Need a rename script

Name: Anonymous 2011-04-16 18:31

ALright, I have the ED archive. It has 9407 files. Each file has no extension, so opening each in a text editor is the only way to view them. They are numbered 0-9407. The first line of each file contains the title of the article. I need something to go through the folder , open each file in a text editor, read the first line, and save the file as a .txt document with the first name as a file name. Please don't leave ED hanging.

Name: Anonymous 2011-04-16 20:22

Do you happen to know how old the dump is? Also, commands go in any [i[GNU+Linux[/i] terminal.

0> 2011-04-17 02:19:06 +02:00 :: ed@neetbook :: 24KB in 2 files :: ~/Downloads/hurre
 :: ll
total 24
drwxr-xr-x 2 ed ed 4096 2011-04-17 02:19 ./
drwxr-xr-x 3 ed ed 4096 2011-04-17 02:19 ../
-rw-r--r-- 1 ed ed 7570 2011-04-17 02:19 6921
-rw-r--r-- 1 ed ed 5078 2011-04-17 02:19 8284

 0> 2011-04-17 02:19:37 +02:00 :: ed@neetbook :: 24KB in 2 files :: ~/Downloads/hurre
 :: ls -1 | while read x; do mv $x "`cat $x | head -n 1`.txt"; done

 0> 2011-04-17 02:19:46 +02:00 :: ed@neetbook :: 24KB in 2 files :: ~/Downloads/hurre
 :: ll
total 24
drwxr-xr-x 2 ed ed 4096 2011-04-17 02:19 ./
drwxr-xr-x 3 ed ed 4096 2011-04-17 02:19 ../
-rw-r--r-- 1 ed ed 7570 2011-04-17 02:19 Religious Freedom Watch.txt
-rw-r--r-- 1 ed ed 5078 2011-04-17 02:19 The Power 5.txt

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List