I would like to ask for the looping statements and conditional statements syntax and some samples for me to easily understand...

And also, How can I edit numbers to have its decimal points like float and double in other programming language.

I'm really noobie with Linux so can someone please help me?

Post here or Email me:

darkloathe@yahoo.com

Thanks...

Hey There,

For loop example:

for x in a b c
do
    echo $x
done

conditional example

if [ $a -lt 0 ]
then
   echo $a
elif [ $a -gt 5 ]
   echo $a
else
   echo $a
fi

You can use printf in bash to work with floating point numerals, otherwise you need to simulate by multiplying or dividing (perhaps both) by 100 (assuming 2 decimal places) at some point and putting the decimal in the correct place using sed or some other OS built-in tool

Best wishes,
Mike

I would like to ask for the looping statements and conditional statements syntax and some samples for me to easily understand...

And also, How can I edit numbers to have its decimal points like float and double in other programming language.

I'm really noobie with Linux so can someone please help me?

Post here or Email me:

darkloathe@yahoo.com

Thanks...

see my sig links for learning bash scripting. If you want to do floating point maths, you can use tools like bc.

Thanks it helps a lot!!!! :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.