The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024

Latest message you have seen: Re: Large Screen TV various questions


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT]Bash Script help



On Thursday 05 June 2003 21:09, Dean Smith wrote:

Or alternatively "cast" the string variables to integer types:

#!/bin/bash

val=42;
limit1=50;
limit2=13;

let foo=$val;
let bar=$limit1;
let baz=$limit2;

if [ $foo -gt $bar ]; then
echo "hurrah!";
else echo "arse!";
fi

if [ $foo -gt $baz ]; then
echo "hurrah!";
else echo "arse!";
fi

ant
--
/\/\
www.ant.org  ('')  www.ant.org
()
Megawatt Winged Avenger



Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.