Which of the following commands are equivalent (Select all answers that apply)?

Bash Scripting >>> Which of the following commands are equivalent (Select all answers that apply)? >>> Linux Tools for Developers

 

test is an older construct, probably best not used in modern scripts

This is standard bash syntax with single brackets

The double brackets are in bash, but not sh

You can use such continuations instead of explicit if then else constructs

===================================

This substitutes the find command results into ls as arguments

This shows the use of xargs

This uses the explicit –exec argument to find

This uses the -ls option to find

===================================

Shorter and less repetitive is always beneficial for comprehension

This requires keeping track of more than one file, making sure they are all in the path, etc.

This makes things shorter and reduces maintenance as changes are made and helps avoid errors

===================================

This will read the variable in and then its value can be used as $VAR

===================================

A bash function must be placed before it is used in a script

A bash function can be placed anywhere in a script, before or after it is used

Correct

bash scripts are not compiled, just interpreted sequentially