TIP: Click on subject to list as thread! ANSI
echo: tuxpower
to: Maurice Kinal
from: August Abolins
date: 2024-09-13 18:20:00
subject: I just discovered busybox

Hello Maurice!

** On Friday 13.09.24 - 03:03, Maurice Kinal wrote to Aug:

 MK> Try this at your busybox commandline;
 MK>   [ "a" = "a" ] ; echo $?

 MK> It should return a 0 for true since a is equal to a.  Now try;
 MK>   [ "a" = "b" ] ; echo $?

 MK> In this case it should return a 1 for false since a is not equal to b.


H:\>busybox [ "a" = "a" ] ; echo $?
[: missing ]

Even in a shell, doesn't work:

H:\>busybox sh
H:/ $ H:\>[ "a" = "a" ] ; echo $?
sh: H:>[: not found
127
H:/ $


..but the bash chell seemed to cooperate:

H:\>busybox bash
H:/ $ [ "a" = "a" ] ; echo $?
0
H:/ $

H:/ $ [ "a" = "b" ] ; echo $?
1
H:/ $

Thx.

How does the double [, or [[ work?




-- 
  ../|ug

--- OpenXP 5.0.58
                                    
* Origin: (2:221/1.58)

SOURCE: echomail via QWK@pharcyde.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.