Friday, October 17, 2008
ubuntu intrepid ibex java needs icedtea
Thursday, October 16, 2008
unix and windows: carriage returns with tr/sed/awk
...and then you will see them at the end of the line as ^M (Ctrl-M)
delete them using tr like this, but this will only work in the following form if "\r" is recognised as a carriage return character. Some versions of tr and sed do not. So before you try this out you should set up a test file with a few "r"s in it in obvious places to make sure the following command is not just deleting "r"s.
tr -d '\r' <> outfile.csv
If the above command deleted "r"s instead of carriage returns then instead of using '\r' use 'Cntl-v-m'. The Cntl-v works on a few shells to let it know that you are going to enter a special character and the "m" you follow it with indicates a carriage return. "m" as in the "^M" you see at the end of the lines when you use cat -v.
There are other ways of removing these carriage returns. You can use sed to do it but again you have to check is it accepts "\r" as a carriage return by experimenting on a very small test file with a few obvious "r"s in it.
sed 's/\r$//' infile.csv > outfile.csv
On a final note, you might have to convert a Unix file to a DOS/Windows file sometimes. You can do it like this:
awk '{ print $0 "\r"}' unix.txt > dos.txt
simple:
tr -d '\015' <> new.file
more simple:
perl -pi -e 's/\015//g' file
Tuesday, October 14, 2008
freebsd jails from sysinstall
Friday, October 10, 2008
freebsd native firefox, linux-firefox, and linux-opera with flash and java.
running freebsd 7 with native firefox for java v6 (diablo-latte) works great, and adds appropriate java entries to the pluginreg.dat which is actually shared with linux-firefox (for proper flash support...nspluginwrapper was causing flash to be out of synch (youtube) for me, but linux-firefox with linux-flashplugin7 worked fine.
linux-opera to the rescue ; everytime i started linux-firefox it would overwrite my pluginreg.dat (which i had some specific java variables in there) - it pissed me off that i couldn't use both firefoxes... i thought about maybe using a diff profile but it pulls pluginreg.dat before the profiles...so i just decided to use linux-opera and be done w/it. thats what i decided on.
btw, i hate flash and java. but both are necessary for my line of work...bullshit.
i need flash to watch videos and listen to music on youtube.
i need java to work with some screwed up oracle applications we use at work.
at least i get to use unix.