Skip to main content

Posts

Showing posts from September, 2012

Line Returns

The Setup
If you are running Linux as a guest OS within Windows using VirtualBox or VMware.
And if you have a Windows folder shared with Linux.
And if those folders have some shell scripts which you edit in Windows but execute in Linux.

Problem
Then there is a very high probability that you might get this error while running those script files on linux that were created in Windows:
$'clear\r': command not found 

I got this error for a simple hello world script:
# My first script
clear
echo "Hello World!"

Reason
Windows represents End of Line (EOL) with two characters: CR + LF but Linux represents End of Line (EOL) with only LF (details)

Solution
So if you want to continue editing the source of these script file on Windows but run them on Linux, you will need to convert the EOL representations from Windows format to Linux format before you run the scripts on Linux.
If you are using Notepad++ as your source editor, you can achieve this by selecting the following option: Edit > EOL…

Mumbai Customs

The other day (11 June 2012) I ordered 2 units of APC. The VIA APC is a low-cost ($49) single-board computer designed to run the Android operating system. (wikipedia article).
The total cost was 49+49+35 = 133 USD. The 35 USD was for shipping to Mumbai, India via Express Mail Service (EMS) (Official | wiki)
The transaction was carried out by Paypal on my credit card. (Exchange rate: 1 Indian Rupee = 0.0175420US Dollars)
The charge on my credit card appeared as 7581.80 INR (Indian Rupees) :


The original invoice was in USD (PDF sent to me via email):
The units were shipped on 27 July 2012 and the tracking was made available online the next day. Within 2 days the package had arrived in India, but it was withheld at the customs office for many days without any additional communications:

A week ago (27 August 2012 - a whole month after the device was shipped), I received a letter from the "Office of the commissioner of Customs (Import)":

The first crazy thing is this "reque…