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: | deepend |
---|---|
Location: | Calgary, Alberta |
Users: | 253 |
Nodes: | 10 (0 / 10) |
Uptime: | 16:31:03 |
Calls: | 1,646 |
Files: | 3,994 |
Messages: | 387,905 |