কিউবি ওয়াইম‍্যাক্সের সাথে ৪৮ ঘন্টা

অনেক প্রতীক্ষার পর গত ৭ তারিখে অনেক কিউবি ওয়াইম‍্যাক্স এর সংযোগ পেলাম। গুলশানে গিয়েছিলাম ইউএসবি মডেম এর জন‍্য। কিন্তু দেখা গেল সেটা ম‍্যাক সাপোর্টেড না। ঝামেলায় পড়ে ভাবলাম বড় ডিভাইসটিই নেব। কিন্তু সেটি গুলশানে কোন দোকানে বড় ডিভাইসটি নাই। ইফতারীর আগে প্রায় ২ঘন্টায় গুলশান ১ থেকে বসুন্ধরায় আসলাম অন্তিকের এক পরিচিত ব‍্যক্তির কাছে। তিনি বড় ডিভাইসটি ম‍্যানেজ করে দিলেন, যদিও বাসায় এসে পরে দেখলাম সেটি পুরাতন। ফোন করলে জানাল সেটি পুরাতন নয় কিন্তু তবুও পরে পরিবর্তন করে দেবে। যাহোক, বাসায় এসে  অন্তিক ডিভাইসটি সেটাপ করে দিল। একটা চাঞ্চল‍্য ছিল মনে। অন্তিককে বিদায় দিয়েই বসে গেলাম কম্পিউটারে। আহা আহা! পেজ কি দ্রুত আসছে। স্পিডটেস্ট করে দেখলাম ০.৫ মেগাবিট পাওয়া যাচ্ছে। আর নিজেই ডাউনলোড করে দেখলাম ৫৫-৬০ পাচ্ছি। Continue reading →

Passing filename arguments to PHP from shell and space issue…

Today, while working with a project to import thousands of articles from text files to wordpress,  I had faced a trouble while I am executing a shell script to iterate through all text files and call a PHP script with sending the filename as argument. The PHP script would then process the file as our requirement. The shell script looked like:

for i in `find . -type f -name '*.txt'`;

do

php import_posts.php $i

done

Here, $i would be the filename and it is passed to PHP script for processing. But the problem is that, when the filename (including directory name) consists any whitespace in its name, the script would broken. For example, some files path looked like
/home/user/articles/Internet Business/Web Hosting/how_to_start_your_company.txt

Here, notice the space after Internet and Web. The shell script was breaking just after Internet. It was sending /home/user/articles/Internet as argument to PHP script and obviously PHP script was failed to find this file.

After searching a lot, finally I found a solution.

It was really simple. I am quoting from his blog:

If none of your files or folders have spaces in their names, then this isn’t a problem, but that is increasingly unlikely nowadays.  If your songs do have spaces in their filenames, then the solution is to change how the shell splits that output.  This is controlled by the variable $IFS, which is set to spaces, tabs, and newlines by default.  We’d like it set to just newlines, so we do:

So, here is the solution. I just put the following line at the top of my shell script.

export IFS=$'\n'

After that everything is fine. The script is running exactly how I intended it to run.

Thanks for Anthony for his solution.

Connecting to internet through Bluetooth in Fedora 9 (GP/Aktel/Banglalink/Teletalk/Warid)

I was amazed seeing that using mobile phone as modem in Ubuntu 8.10 is just like learning abc. You just connect a modem using USB cable or Bluetooth and Ubuntu will take care of the rest. The easy and step by step interface is so easy that any novice can configure it too.

But I am mostly Redhat variant user. I use Fedora 9 for my laptop’s OS beside Windows XP. I did not find configuring Bluetooth in Fedora as easy as in Ubuntu. But no worry, its not hard enough. I have found a good tutorial which helped me to configure bluetooth to use internet. If you need help in fully Bangla, please visit this page. Continue reading →

About Internet using Mobile Phone

Quite often I see posts about “how to setup internet in mobile phone?” like questions. I have answered the details several times specially in ict_of_bangladesh group. As this is happening quite often, I think its better to write up it here and give everyone this link to follow.

I am user of GP’s EDGE Service. So I only know about GP’s configuration. I will tell about it here now. Will try to add others in future.

Internet Packages:
Now GP offers 3 Internet Package naming P1, P2 and P3.
Continue reading →