Sysop: | Amessyroom |
---|---|
Location: | Fayetteville, NC |
Users: | 39 |
Nodes: | 6 (0 / 6) |
Uptime: | 62:48:13 |
Calls: | 171 |
Files: | 117 |
Messages: | 63,104 |
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.