the semicolon simply separates two consecutive commands.
the manpage (man bash
) says (in the chapter Lists):
Commands separated by a ; are executed sequentially
e.g. the following fill first run the command foo
and then the command bar
.
foo; bar
to parse your example correctly, you first have to build a hierarchical model of it:
variable=`ls -A $1 | grep '[abc]'; ls -1 $1`
can be broken down to variable=...
(something within back-ticks) and ls -A $1 | grep '[abc]'; ls -1 $1
(the thing within backticks).
backticks are used get the output of a command (see the Command substitution in man bash
); so you are assigning the output of the entire ls -A $1 | grep '[abc]'; ls -1 $1
to the variable.
the output of the substutited command is the list of files matching a certain pattern (including hidden hildes) appended with the full list of files (whatever that can be used for...)