azekeil: (oooooooo!)
[personal profile] azekeil
First, let me put what follows in some context. I have been very busy at work, moving servers around and hacking files etc.

I remembered something I was going to tell [livejournal.com profile] kissycat1000 about and my thought process ran "Oh yes, must remember to tell [livejournal.com profile] kissycat1000 that I edited the bath and took out all the hair.. wait.. something's not right with that sentence.. urrrr.."

So, I bring you DIY in linux:
# vi /usr/local/lib/bath
:1,$s/hair//g
:wq!

Date: 2004-10-13 01:02 pm (UTC)
diffrentcolours: (Default)
From: [personal profile] diffrentcolours
Shurely %s/hair//g.

Or just sed -i 's/hair//g' /usr/local/lib/bath

Must... resist..... argh! *gasp* too weak...

Date: 2004-10-13 01:04 pm (UTC)
From: [identity profile] dennyd.livejournal.com
# perl -e 'open FUZZY, "/usr/local/share/bath"; @contents = ; close FUZZY; $contents = "@contents"; $contents =~ s!hair!!sig; open CLEAN, ">/usr/local/share/bath"; print CLEAN $contents; close CLEAN;'

Re: Must... resist..... argh! *gasp* too weak...

Date: 2004-10-13 01:06 pm (UTC)
From: [identity profile] dennyd.livejournal.com
Bah... poxy HTML.

@contents = <FUZZY>;

Date: 2004-10-13 02:11 pm (UTC)
From: [identity profile] whotheheckami.livejournal.com
####
out of cheese error
redo universe from start
####

Date: 2004-10-13 02:12 pm (UTC)
cryx: me showing off hair done by a stylist from paris (Default)
From: [personal profile] cryx
LOL!!!

Date: 2004-10-13 02:33 pm (UTC)
From: [identity profile] azekeil.livejournal.com
well I thought about sed, but I wanted to edit rather than 'cheat' ;)

Date: 2004-10-13 02:34 pm (UTC)
From: [identity profile] azekeil.livejournal.com
And I must admit, I'm not so hot with vi. Had to look up the exact syntax for the replace command, which is why it looks a bit unhappy.

Re: Must... resist..... argh! *gasp* too weak...

Date: 2004-10-13 02:37 pm (UTC)
From: [identity profile] azekeil.livejournal.com
Lol! I like the /usr/local/share/bath ;)

Date: 2004-10-13 02:39 pm (UTC)
From: [identity profile] azekeil.livejournal.com
I know, sad .__.

Date: 2004-10-13 11:38 pm (UTC)
From: [identity profile] whotheheckami.livejournal.com
A P'Terry Pratchett reference - [profile] daemongirl will know what I mean ;@)

Date: 2004-10-14 12:24 am (UTC)
From: [identity profile] gashinryu.livejournal.com
You could always try booting her up with this in the morning...

path=landing\bathroom\bath
REM hair

Date: 2004-10-14 12:56 am (UTC)
From: [identity profile] stuartl.livejournal.com
#define BLOCKAGE HAIR

int main(void) {
  int fd;
  char contents;

  fd = open("/dev/plumbing", O_RDWR | O_EXCL);
  ioctl(fd, IOCTL_SETDEV, IOCTLSD_BATH);
  lseek(fd, BLOCKAGE, SEEK_SET);
  while (read(fd, &contents, 1)) {
    if (contents == CONTENT_HAIR) {
      lseek(fd, -1, SEEK_CUR);
      write(fd, CONTENT_WATER, 1);
    }
  }
  close(fd);
  return 0;
}

Date: 2004-10-14 01:00 am (UTC)
From: [identity profile] stuartl.livejournal.com
I don't know what's more worrying:
  • I considered C to be a practical and fast alternative.

  • I wrote all of that in C.

  • I syntax checked it.

  • I looked at man pages to check I remembered the function call syntax correctly.

  • I haven't done any error checking.

Date: 2004-10-14 01:13 am (UTC)
From: [identity profile] sarah-mum.livejournal.com
Stop the G33king! It's getting me all excited. :-)

Date: 2004-10-14 03:57 am (UTC)
From: [identity profile] barty.livejournal.com
I have been known to grep my pockets for coins.

Date: 2004-10-14 06:10 am (UTC)
From: [identity profile] chocojon.livejournal.com
GEEKS!

oh, yeah. Hi, I'm Mr. Pot. ... :)

March 2014

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 12th, 2026 05:37 pm
Powered by Dreamwidth Studios