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: | Tetrazocine |
---|---|
Location: | Melbourne, VIC, Australia |
Users: | 4 |
Nodes: | 8 (0 / 8) |
Uptime: | 192:03:21 |
Calls: | 62 |
Files: | 21,500 |
Messages: | 70,991 |