Wed, 08 Mar 2006

Bash Prompt

I managed to add two more sections to my article on writing robust shell scripts including using trap and making more atomic changes. Had some useful feedback including making the fact that a few small tweaks made it apply to more than just bash. Following from that I've added an article about changing your bash prompt and how mine has been built up over the years to something useful to me. Hopefully it'll give other people some ideas.

[, , , , ] | # Read Comments (4) |

Comments

Privoxy Crack

When you develop a anonymising, ad-removing, popup-blocking proxy server, don't do what Privoxy appear to do, which is s/open\((.*)\)/privoxyWindowOpen(\1)/g because then you'll convert any instances of "open()" in the text, confusing people.

Update:Bug reported, but nothing has happened to it since 2004-06-25.

[, ] | # Read Comments (2) |

Comments

Perl open()

Dear perl programmers,

When using open(), please don't use:

open FILE, "$file" or die "couldn't open file\n";

It really helps if you tell us what file you're trying to open and what went wrong. The correct error message is:

open FILE, "$file" or die "could not open $file: $!\n";

Thank you.

[, ] | # Read Comments (9) |

Comments