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

Pages: 1-

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 18:48

What format are they in?

Name: Anonymous 2011-04-16 18:50

They arent in a format. Just files. No extension.

Name: Anonymous 2011-04-16 18:52

Text files? HTML? Wiki markup?

Name: Anonymous 2011-04-16 18:54

It just says file. The only way to even view the text is by right clicking and using notepad to edit it.

Name: Anonymous 2011-04-16 19:03

There is no format.

YHBT

Name: Anonymous 2011-04-16 19:07

No, look, it just says file.

Name: Anonymous 2011-04-16 19:08

>>1
Why would you want to do this?

Name: Anonymous 2011-04-16 19:22

Upload to mediafire and I'll see what I can do.

Name: Anonymous 2011-04-16 19:25

for X in * ; do ; mv "$X" "$(head -1 "$X").txt" ; done

Name: Anonymous 2011-04-16 19:26

Alright, I'll put it up on mediafire, hold on...

Name: Anonymous 2011-04-16 19:33

>>11
I'll fuck you in the ass you fucking Jew

Name: Anonymous 2011-04-16 19:35

>>12
Why so hurt feelings?

Name: Anonymous 2011-04-16 19:38

85% complete
upload speed is outrageous

Name: Anonymous 2011-04-16 19:42

http://www.mediafire.com/?cpl49lub9gyntaj
Here you go. Thats the last of ED.

Name: Anonymous 2011-04-16 19:44

>>14
I'll shit in your daughters stretched vagina, asshole

Name: Anonymous 2011-04-16 20:00

Why didn'T you grab the images?
Also >>10-sans post should do the trick.

Name: Anonymous 2011-04-16 20:02

This isnt my archive. I found this myself, its just the text, in post format.
What do I do with >>10 's code? Tell me as if I were an eight year old, because I have no idea what to do.

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

Name: Anonymous 2011-04-16 20:29

>>18
Go away you stupid fucking script kiddie.

Name: Anonymous 2011-04-16 20:30

you guys are hopeless.

Name: Anonymous 2011-04-16 20:47

>>19
'neetbook
'ricer PS1

Go away.

Name: Anonymous 2011-04-16 20:50

>>21
Hold on for a minute.

Name: Anonymous 2011-04-16 20:52

>>21
What was that? It sounded like a script kiddie begging for someone to write him some scripts because he's an INCOMPETENT FUCK THAT SHOULD KILL HIMSELF.

Name: Anonymous 2011-04-16 21:01

>>24 so says the angry programmer. you get paid to write code for incompetent fucks.

Name: Anonymous 2011-04-16 21:11

>>24
No, this is the script kiddie writing the stupid script...

Name: Anonymous 2011-04-16 21:18

>>26
Ambiguous use of this without reference

Name: Anonymous 2011-04-16 21:36

Oh wow this thread is bad.

Name: Anonymous 2011-04-16 21:49

Done uploading now.

for X in /home/metalhannes/Desktop/ED_archive/*
do
    if `head -1 $X | grep "/" 1>/dev/null 2>&1`
    then
        mkdir -p "`head -1 $X | awk  -F '/' '{out=""; for(i=1;i<NF;i++){printf "%s/", $i}; printf "\n"}'`"
    fi
    mv $X "`head -1 $X`.txt"
done

This was the script.

Name: Anonymous 2011-04-16 21:56

Name: Anonymous 2011-04-17 0:29

>>22
fuck off and die, fag

Name: Anonymous 2011-04-17 1:00

ED died because it was too "edgy" for mainstream consumers.
only trolls with thick skin, could find ED funny in long term. Thats why they started whatport80 and ohtheinternet
Trolls are rare and unprofitable demographic

Name: Anonymous 2011-04-17 1:57

>>32
And most importantly, trolls all have AdBlock and don't use Facebook.

Name: Anonymous 2011-04-17 2:52

>>33
*smirks*

Name: Anonymous 2011-04-17 3:21

>>22
Do what >>31 said, imageboarder.

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