Pulp Fiction

A traveller\’s diary through journey of life…

Why I love Linux

Posted by nishitdesai on August 31, 2005

It’s been a month since I am here and for a month I have been working on Win2K at my office. Haven’t seen Linux in loooong time. Missing it, especially today.

Today I needed to do some scripting in Windows, for some personal work. Due to inefficiency in finding some advanced features for wget and in the presence any good download manager, I needed to shift towards this scripting. Oh God, What an unfortunate soul. Need to work in windows and that too with scripting. After coming to real world (read industry) I started loving linux more, you know why? because here you can’t use pirated softwares any more and this is not IITK, where you just switch on your DC++ and download any bloody software within seconds. Thought, Let’s take a dive and at unfortunate moment started scripting.

Now, I needed to make a FOR loop. After trying out different keywords found out following command

FOR %%e IN (1 2 3 4 5 6) DO …

Now why would you need to type two ‘%’ to mark a variable?? Anyways, this command will run for six time take value from 1 to 6. Now what would you do if you need to run loop for say 100 times are you going to write (1 2 3 … 100). Well, you have to, I couldn’t find any other technique. So thought let’s try some another technique, something similar to while loop, implement using notorious GOTO. Now the question was how to set a variable and use it. tried out various combination


Neither worked and suddenly remembered good old days where somehow I studied AUTOEXEC.BAT and they used something like SET for setting a variable. %$@@#$%%@$#. What the hell? why to type something extra as SET, I bet even Bill Gates won’t be able to tell you that. Don’t lose the spirit, go ahead. I thought. Now, came the next ultimate question, how to increment a variable? again combinations…


Again, no luck. There exists something like INCR in dos, but for some reason that won’t work in Win2K, so here is where I am stuck up. No clue to get out of this. Don’t think I didn’t Google for any of this stuff. After hard work on Google, I am pouring out my frustration here. Should get back to search now I guess. God bless me!!

Recent breakthrough : Finally managed to find out the way to increment a variable. it goes

SET /A i += 1

Now don’t ask me why to put extra /A for doing so, in one other achievement, I found out that IF syntax would be like

IF NOT “i”=”100”

but I am still unaware about use of in IF, because if I use those, it says unexpected end of statement or something like that. Let it be whatsoever it is, I am done with my job. After I was done with my download thing, I am enjoying the geeky strips I downloaded and sharing one which is very pertinent with this one.


7 Responses to “Why I love Linux”

  1. Cool strip :d

    I think u suffer from lack of a good free download manager. Check out these “free” download managers for windows:

  2. Bhumi said

    the strip was GOOD!! 🙂 though m not a CS person can feel your frust here..

  3. In my case its diffrent….

    After working in Linux for a long time I feel the following…

    In these darkened rooms, where I spend
    oppresive days, I pace to and fro
    to find the windows. — When a window
    opens, it will be a consolation. —
    But the windows cannot be found, or I cannot
    find them. And maybe it is best that I do not find them.
    Maybe the light will be a new tyranny.
    Who knows what new things it will reveal.

    Constantine P. Cavafy (1903)

  4. Hemal Modi said

    Note that the ‘%’ prompt indicates that the command should be issued from the C shell, and the ‘$’ prompt indicates the Bourne shell. It’s actually amazing how clever Unix is 😉

    % ls God
    God not found

    % ar m God
    ar: God does not exist

    % rm God
    rm: God nonexistent

    % ar t God
    ar: God does not exist

    % ar r God
    ar: creating God

    % set i=”Democratic_Platform”;mkdir $i;chmod 000 $i;ls $i
    Democratic_Platform unreadable

    % “How would you rate The President’s incompetence in Katrina Disaster?
    Unmatched “.

    % %Vice-President
    %Vice-President: No such job.

    % scan for this
    $ chown mchammer this $ touch this
    Can’t touch this: permission denied.

    % (-
    (-: Command not found.

    % cp /dev/null sex;chmod 000 sex;more sex
    sex: Permission denied
    % mv sex show
    % strip show
    strip: show: Permission denied

    % who is my match?
    No match.

    % awk “Nishit Desai, the ship is sinking”
    awk: syntax error near line 1
    awk: bailing out near line

    $ PATH=pretending! /usr/ucb/which sense
    no sense in pretending!

    % mkdir “The phone book”
    % more “The phone book”
    The phone book is a directory

    % cat “door:paws too slippery”
    cat: cannot open door:paws too slippery

    % cat ‘the can of tuna’
    cat: cannot open the can of tuna

    % cat “food in cans”
    cat: Cannot open food in cans: No such file or directory

    $ mkdir matter; cat>matter
    matter: cannot create

    $ drink

  5. Sujata said

    The comic strip was good !! :D:D

  6. Anonymous said

    Not that they make it easy to discover, but….

    for /L %x in (1,1,100) do echo %x

    the format of the parens is (start,step,end) … “for” can do almost anything, check out “for /?”


  7. Nishit said

    thanks anon, but it would be nice if you’d written your name instead of ‘S’.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: