I normally use ;
to combine more than one command in a line, but some people prefer &&
. Is there any difference? For example, cd ~; c
Commands separate by ;
are executed sequentially regardless of their completion status.
With &&
, the second command is executed only if the first completes successfully (returns exit status of 0).
This is covered in the bash manpage under Lists
. I would expect any Unix-like shell to support both of these operators, but I don't know specifically about the Android shell.