$b1" | bc)if [ $st -eq 1 ]; then # 1 == true echo "True"else echo "False"fi. How to compare floating point number in shell scripting ? a1=10.50b1=10.01if [ $a1 -gt $b1 ]| bcthen echo "greater"else echo "lesser"fi a1=10.50b1=11.01st=$(echo "$a1 > $b1" | bc)if [ $st -eq 1 ]; then # 1 == true echo "True"else echo "False"fi . 2 members have posted answers.">
![]() Related Questions Latest Answer : by using : exec Latest Answer : Broadly categorised in 3 for while until ... Latest Answer : global variable is created using export command in ksh - export x='name' In csh its created using setenv command-setenv x 'name'this 'x' variable will be visible in current shell as well as in child shell also.local variable ... If you have a string "one two three", Which shell command would you use to extract the strings? When you login to a c shell, which script would be run first? (before the terminal is ready for the user) Latest Answer : in shell we cannot edit the text whereas in the editor it is possible to edit the text ... Read Answers (5) | Asked by : chitrabanu Latest Answer : echo enter a string read stringlen=`expr length "$string"`i=$lenreverse=''while [ $i -gt 0 ]dochar=`echo $string | cut -c $i`reverse="$reverse$char"i=`expr $i - 1`doneecho string:$stringecho reverse:$reverseif [ $reverse = ... Latest Answer : IF the Database is DB2 then the script is :db2 "connect to $dbname user $userid using $password" ... Read Answers (7) | Asked by : Brahma Reddy Thatiparthi Latest Answer : #! line states the interpreter to be used by the shell to interpret the script.Here, ksh interpreter is invoked for interpretation of the script. ... Read Answers (6) | Asked by : Max What is the basic difference u find between a shell script and perl.I mean the advantages of one over the other. Read Answers (2) | Asked by : O.Sajit
Sponsored Links
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||