busyboxBusyBox v1.37.0-FRP-5398-g89ae34445 (2024-06-25 08:38:11 BST)
What are the [ and [[
Try this at your busybox commandline;
[ "a" = "a" ] ; echo $?
It should return a 0 for true since a is equal to a. Now try;
[ "a" = "b" ] ; echo $?
In this case it should return a 1 for false since a is not equal to b.
busybox [ "a" = "a" ] ; echo $?[: missing ]
busybox shH:/ $ H:\>[ "a" = "a" ] ; echo $?
busybox bashH:/ $ [ "a" = "a" ] ; echo $?
busybox bash
How does the double [, or [[ work?
Given the version of busybox, that is either an aliased ash or hush
shell. My guess is ash but the busybox config should tell the tale.
Apparently google bash scripts default to [[ for all their tests. I just don't recall the reason but I am obviously getting too old for this business. :::sigh:::
I was relying on separate GNUWin32 programs before.
but the maximum split it supported was 2GB. Busybox split
doesn't seem to have that limitation.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 991 |
Nodes: | 10 (1 / 9) |
Uptime: | 132:54:42 |
Calls: | 12,960 |
Calls today: | 2 |
Files: | 186,574 |
Messages: | 3,266,147 |