You're replying to a comment by Gaurav.

Gaurav Permalink
July 03, 2012, 05:48

Hi,

its all are very useful and interesting. I would like to add two more things..... the cmnd#3 the same o/p can be produced by

seq -w 1 10 it will give 01 02 03 04 05 06 07 08 09 10, but it

will not work if we write seq -w 1 9

one more method to check whether a number is negative or not

there is one nice one liner.....

v=-76.67 ; if [ "${v/${v#?}}" = "-" ]; then echo "number is negative"; else echo "number is positive"; fi

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the first letter of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.