I should learn, one of these days, that no project related to compiling and installing new package is going to be simple or “just five minutes.” Wanted to check out a program for Distributed Proofreaders, to see if there’s a better way than using the browser interface. That program needs, apparently, about 1/4 of CPAN. Naturally, it doesn’t appear that all of the CPAN modules it wants (mostly related to Tk, which I thought had gone out years ago…) are available as packages for Ubuntu.
Also, along the way, I wanted to convert the Perl scripts included with the DP program from DOS to Unix line-ends — and noticed that dos2unix is not installed on Ubuntu, nor does that seem to be available as a package.
So, a quick Google and I find a short script that will do the trick. (Yes, I could probably write one myself, but why bother if the LazyWeb can do it for you?) So, when all else fails:
awk '{ sub("\r$", ""); print }' winfile.txt > unixfile.txt
And that’s all that’s needed. Still, I decided I wanted to go ahead and install the utilities, so I checked Freshmeat and found Hany’s Dos2Unix. Surely, that would be packaged for Ubuntu. Hm. Nope. Doesn’t appear to be packaged for Debian, either. At this point, I think I will see if I can package it for Ubuntu and Debian and put it into the respective repositories.
Finally — half an hour after I started a five-minute project, I’ve got the GuiGuts tool running. Actually a bit disappointing.
Ah well. I’ve whipped up a temporary package for Ubuntu AMD 64 if anyone wants it. Time to build an “official” package and see if the Ubuntu and Debian folks want it.
Hi ! Just discoverd Your Blog via Google looking for “dos2unix ubuntu”. Finally i found dos2unix in sysutils, so no need to package it.
For the future: take a look at apt-file, which helps you find specific files in your repository.
Cheers dockane
Thanks. That’s weird, apt-cache search didn’t turn it up, I would have thought it would be in the description.
Thanks zonker and dockane, for pointing me to sysutils after searching for dos2unix on ubuntu
As a side effect of reading this, I got pissed at apt-file not working for me.
It turns out I needed a ‘sudo apt-file update’ first.
Just coming to grips with ubuntu feisty (normally develop on fedora) – note the following:
mick@ubuntu-desktop:~/packages$ dos2unix
The program ‘dos2unix’ is currently not installed. You can install it by typing:
sudo apt-get install tofrodos
…. and that was it.
Yeah, Feisty has it going on. Unfortunately, this was pre-Feisty. I’m really looking forward to seeing what Gutsy has to offer.