Script which can decide where to point i/p

Dear friends,
:slight_smile: I need your help again. This time I have written 2 scripts i.e. A.sh & B.sh and both of them takes �serial no� as input. Both the scripts are exactly same except one thing, both are pointing to different tables.
Now I want to write another script that will decide whether to send a particular serial no to script A.sh or B.sh.
For example:- Serial no from 1 to 700000 >> Script A.sh
700001 to Infinity (Or say 100,00,000) >> Script B.sh
How can it be done?
Please guide me.
Thanx in advance
Bye

Hint

$ sn=800; [ $sn -le 700000 ] && echo 'a.sh' || echo 'b.sh'
a.sh
$ sn=80000; [ $sn -le 700000 ] && echo 'a.sh' || echo 'b.sh'
b.sh

Dear Agn,
This script is working exactly how i wanted it to be. Thanx for the quick n perfect reply. If u dont mind can u please clear few things like what is "-le" option, what "&&" is and what "||" indicates?

-le - check if LHS is less that or equal to RHS
&& - logical AND
|| - logical OR

So if the -le check returns true, then it echo's a.sh and if it fails the && gets ignored and b.sh is echo'd.

Wow thats gr8... n nicely put in a single string.. thats gr8..
Thanx for your help :slight_smile:
Bye n take care
Anushree.