Skip to content

Sed Messed Up on OS X?

While trying to further my knowledge in unix/shell programming I’ve found that the unix command sed is messed up in os x. I think the problem is that the GNU/linux versions of some commands are different that the Darwin/BSD versions, this might be obvious to you linux/unix gurus out there but to me this is new news. I always assumed that the functionality in the commands on os x and most linux variants were the same.In any case, I downloaded the GNU sed source code and compiled a nice fixed sed command for myself (After I compiled it I found out you could of just easily gotten GNU sed through fink-commander. :P). Walla, the newline problem I was having with the mac os x version of sed was fixed.

Continue Reading

Remove All Files Without Certain Extensions

I needed to remove all files in a hierarchy of folders that didn’t have certain extensions. I searched the net for a quick & dirty bash script to do this, but all the scripts I found only removed files in the current directory, I needed to remove files in the current directory and child directories. Heres the bash script I came up with. Assuming ~/Desktop/targetDir is the root directory you want to remove files from, and you don’t want files ending in .css, .html, or .htm. NOTE: if your file paths contain spaces this command will probably fail/mess something up. I take no responsibility for anything that happens to your computer because of this script. Hopefully somebody might find this useful.

Continue Reading

Switching To Dreamhost

Well, I think I finally have given in. Over the next 2 months I will be transferring all my sites over to Dreamhost from Hostm which have been an ‘ok’ host. Dreamhost however currently is having an amazing deal- 80% off of their hosting. Thats just incredible, considering their price is already low at $10/month. A few other things that I like about Dreamhost: SSH access, I used this on a clients Dreamhost account and its pretty sweet. Always improving their services, every few months they add or enhance their service. I like their Kbase, its very nicely set up with ability to post/read comments to articles Their referral program is awesome I have 97 days to test it out to see if I like it or not…

Continue Reading

OS X Hex Value Color-Picker Plug-In

Recently I was throwing around an idea about making a plug-in for the standard color-picker panel for OS X. All I really wanted it to do was give me the hex value of the selected color. I did a fair amount of research and eventually found that someone had already done it. I’ve never seen that advertised, or shown anywhere; but so far I’ve found the plug-in proves useful. Now if only the author would make the source available so a good example of how to make a color-picker plug-in would be available…

Continue Reading

Expr Crippled on OS X

Lately, I’ve been trying to dig into shell scripting. While reading through a Bash Scripting Guide and testing out the expr command line utility I found that the OS X version of expr is very limited compared to the linux/standard version. All of the nice string related commands outlined on the Man Page for expr don’t work on the OS X version of the utility. This is severly limiting especially because (as far as I know) there is no way to find the index of a substring in Bash scripting except through expr. In any case, I’ve filed a bug-report (rdar://4269034) about this problem. On a side-note, thank-you everyone who responded to my previous post on ‘What is Missing?’. I will be making one of the suggested projects.

Continue Reading

Interactive Software Development

10 years ago software was developed by people in small cubicals coding all day. Ok, maybe thats a little bit of an exaggeration, but for the most part software companies pumped out a new product every year that had new features that the users of their software just had to have. The software companies didn’t really have that much interaction with their client. Software development today is rapidly changing today. Software is built to accomadate what the user really needs not what the developer thinks the user needs. Software companies like Macromedia ask their user base what features they want in the software, what they think the software needs…

Continue Reading

Hurricane Katrina

A little late in reporting this, but life is busy… The devastation wrought by hurricane Katrina is enormous, its very saddening to see an American city looking like a third-world country. Even more saddening is level of crime that New Orleans is experiencing, the raping and stealing that is occurring is especially saddening. Instead of the citizens of New Orleans trying to be charitable to each other, help each other survive, and find a way out of the city; some citizens have given into evil-doing and are committing mass crimes preventing law officials from saving the various people all around the city….

Continue Reading