Tuesday, April 15, 2008

Linux is still dumb....inherited Shell genes

If you are working on both windows and linux at the same time, one of the first annoying thing that you will discover is that linux's shell (bash) is very unforgiving when it comes to "\r" or
carriage return or ctrl-ascii-13 ...whatever you call it.

When you use an ide to write some scripts and when you copied it to Linux, you get a really dumb message : "bad intepreter: No such file or directory" . It is really amazing at the time and age when software are supposed to be smarter and better, we have linux still stuck with dumb shells like bash who dont understand nor have to common sense to ignore "\r" as part of the new line. Although on windows if you open via notepad any text files written in unix, you will be similarly annoyed due to the missing \r, but i have yet to find a Windows program that is unable to process a file that is missing \r or created by unix text editors. Thus i can say Linux is still pretty much dumb due to the fact that it inherited some cow legacy while Windows have smartly sided with the users.

Meanwhile, you have to live with doing commands like this :

mv original.file backup.file; tr -d '\r' <> original.file

whenever you move some scripsts over from Windows.

No comments:

Post a Comment