Front page
Silflay Hraka?

Bigwig is a systems administrator at a public university
Hrairoo is the proprietor of a quality used bookstore
Kehaar works at a regional newspaper
Woundwort is a professor of counseling at a private university

The Hraka RSS feed

bigwig AT

Friends of Hraka
Daily Pundit
cut on the bias
Meryl Yourish
This Blog Is Full Of Crap
Winds of Change
A Small Victory
Silent Running
Dr. Weevil
Little Green Footballs
Fragments from Floyd
The Feces Flinging Monkey
Dean's World
Little Tiny Lies
The Redsugar Muse
Natalie Solent
From the Mrs.
The Anti-Idiotarian Rottweiler
On the Third Hand
Public Nuisance
Not a Fish
Electric Venom
Skippy, The Bush Kangaroo
Common Sense and Wonder
Neither Here Nor There
The Greatest Jeneration
Ipse Dixit
Blog On the Run
Redwood Dragon
Greeblie Blog
Have A Cuppa Tea
A Dog's Life
Iberian Notes
Midwest Conservative Journal
A Voyage to Arcturus
Trojan Horseshoes
In Context
The People's Republic of Seabrook
Country Store
Blog Critics
Chicago Boyz
Hippy Hill News
Kyle Still Free Press
The Devil's Excrement
The Fat Guy
War Liberal
Assume the Position
Balloon Juice
Iron Pen In A Velvet Glove
Freedom Lives
Where Worlds Collide
Knot by Numbers
How Appealing
South Knox Bubba
Heretical Ideas
The Kitchen Cabinet
Bo Cowgill
Raving Atheist
The Short Strange Trip
Shark Blog
Ron Bailey's Weblog
Cornfield Commentary
Northwest Notes
The Blog from the Core
The Talking Dog
WTF Is It Now??
Blue Streak
Smarter Harper's Index
nikita demosthenes
Bloviating Inanities
Sneakeasy's Joint
Ravenwood's Universe
The Eleven Day Empire
World Wide Rant
All American
The Rant
The Johnny Bacardi Show
The Head Heeb
Viking Pundit
Oscar Jr. Was Here
Just Some Poor Schmuck
Katy & Bruce Loebrich
But How's The Coffee?
Roscoe Ellis
Sasha Castel
Susskins Central Dispatch
Josh Heit
Aaron's Rantblog
As I was saying...
Blog O' Dob
Dr. Frank's Blogs Of War
Betsy's Page
A Knob for Brightness
Fresh Bilge
The Politburo Diktat
Drumwaster's rants
Curt's Page
The Razor
An Unsealed Room
The Legal Bean
Helloooo chapter two!
As I Was Saying...
SkeptiLog AGOG!
Tong family blog
Vox Beth
I was thinking
Judicious Asininity
This Woman's Work
Fragrant Lotus
Single Southern Guy
Jay Solo's Verbosity
Snooze Button Dreams
You Big Mouth, You!
From the Inside looking Out
Night of the Lepus
No Watermelons Allowed
From The Inside Looking Out
Lies, Damn Lies, and Statistics
Suburban Blight
The SmarterCop
Dog of Flanders
From Behind the Wall of Sleep
Beaker's Corner
Bad State of Gruntledness
Who Tends The Fires
Granny Rant
Elegance Against Ignorance
Say What?
Blown Fuse
Wait 'til Next Year
The Pryhills
The Whomping Willow
The National Debate
The Skeptician
Zach Everson
Geekward Ho
Life in New Orleans
Rotten Miracles
The Biomes Blog
See What You Share
Blog d’Elisson
Your Philosophy Sucks
Watauga Rambler
Socialized Medicine
Verging on Pertinence
Read My Lips
The Flannel Avenger
Butch Howard's WebLog
Castle Argghhh!
Andrew Hofer
Moron Abroad
White Pebble
Darn Floor
Pajama Pundits
Goddess Training 101
A & W
Medical Madhouse
Slowly Going Sane
The Oubliette
American Future
Right Side Redux
See The Donkey
Newbie Trucker
The Right Scale
Running Scared
Ramblings Journal
Focus On Reality
Wyatt's Torch

May 21, 2002

Stroking Data

Well, massaging data, really. I'd rather just skip the massage and go directly to getting my data drunk, but that's no way to form a lasting relationship. If you recall, I claimed at the end of the last post that my data looked a lot like this;

THEWIG~1 MP3 1,867,904 04-06-02 12:10p The Wiggles - Teddy Bear Hug.mp3
THEWIG~2 MP3 1,966,080 04-06-02 4:42p The Wiggles - The Monkey Dance.mp3
THEWIG~3 MP3 1,370,112 04-06-02 1:24p The Wiggles - Rock A Bye Bear.mp3
THEWIG~5 MP3 2,327,220 04-06-02 5:14p The Wiggles - Uncle Noah's ark.mp3

It's a damned lie. That data is neat, clean and ready to commit. It exists, mind you, but it's embedded in much nastier data, stuff that looks so;

AFROM~19 MP3 4,975,989 08-23-01 11:07p AfroMan - Because I Got High.mp3
ALIENA~1 MP3 8,372,224 09-01-01 8:58a Alien Ant Farm - Smooth criminal.mp3
IRISHR~1 MP3 3,406,064 09-05-01 9:33p Irish Rovers - Finnegans Wake.mp3
SKANDA~8 MP3 5,148,967 04-03-00 12:07a Skandalous All-Stars - Radio Free Europe.mp3
JOESTR~1 MP3 4,270,834 09-06-01 10:01p Joe Strummer & The Mescaleros - Sandpaper Blues.mp3
DUBLIN~2 MP3 4,082,695 09-05-01 9:38p Dubliners & Pogues - Whiskey In The Jar.mp3
AFRIKA~6 MP3 6,153,323 03-30-00 4:17p Afrika Bambaataa & Soul Sonic Force - Planet Rock.mp3

Before, everything was lined up neatly, ready for slotting into Access. Now it almost lines up, but i'm not playing horseshoes or hand-grenades. Close isn't good enough. Access will allow you to import data from a text file two different ways. You either specify the data in the file is of a fixed width or that it is delimited in some manner. Delimited means that some character, say Buddy Ebsen, pops up in between every piece of important data in a record. Each of these pieces is called a field. If the Afroman song above was delimited by Buddy Ebsen, it'd look like this;

AFROM~19 MP3Buddy Ebsen4,975,989Buddy Ebsen08-23-01 11:07pBuddy EbsenAfroManBuddy EbsenBecause I Got High.mp3

I'd be happy with the size of the file, 975,989, the name of the artist, Afroman, and the song, Because I Got High.mp3. Since Buddy isn't here to assist me, I've got to figure out someway to put a delimiter into each of the 4000+ lines of this file. Let's examine Afroman more closely;

AFROM~19 MP3 4,975,989 08-23-01 11:07p AfroMan - Because I Got High.mp3

My life is a little easier because I don't want all the fields. I need to make the line above look like this;

4,975,989-AfroMan - Because I Got High.mp3

Once it does, the dash is the delimiter, and I am re-goldenized

Once again, doing it by hand is not an elegant solution, so that's out. I do know of a way to do this, I think. And, just like yesterday, it can't be done in windows. Or, if it can be done in Windows, I don't know how to do it. And i've tried, believe me.

The first thing I do it is connect to one of the UNIX servers at work. UNIX can do anything. Once I'm there I cut and paste all 4000 or so records into a an open file. I used UNIX's vi editor to create the file and I'll use some of the functionality it has to start replacing data en masse. If you'd like a small taste of what vi is like, create a file in Notepad without ever using the mouse to do anything. This includes opening and closing Notepad. However, I can replace a lot of stuff with just a few keystrokes. These, in fact;

:1,$s/^.*MP3 // and :1,$s/ .*:... /-/ give me this

4,975,989-AfroMan - Because I Got High.mp3


Tomorrow, why they do that.

Posted by Bigwig at May 21, 2002 10:02 PM | TrackBack
First time visitor to House Hraka? Wondering if everything we produce could possibly be as brilliant/stupid/evil/pedantic/insipid/inspired as the post you just read? Check out the Hraka Essentials, the (mostly) reader-selected guide to Hraka's best posts, and decide for yourself.
Post a comment Note: Comments with more than two dashes per line will be blocked as spam.

Remember personal info?