if [ cmp -s "$expectedOut" "$actualOut" ]; then
The following line of code keeps giving me errors saying that there are too many arguments. however I know this is the proper typical use of cmp so I think it may have to do with the brackets. Anyone know whats really going on here?
Lose the [
]
.
if cmp -s "$expectedOut" "$actualOut" ; then
The syntax of if
is
if Command; then
[
is just one possible command (on that happens to expect ]
as its last argument to make things look pretty).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With