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: | Angel Ripoll |
---|---|
Location: | Madrid, Spain |
Users: | 9 |
Nodes: | 8 (0 / 8) |
Uptime: | 41:24:54 |
Calls: | 507 |
Files: | 14,257 |
D/L today: |
9 files (3,820K bytes) |
Messages: | 64,699 |