Also in the shell-lesson-data/molecules
directory, what would be the output of the following loop?
> for datafile in *.pdb
> do
> cat $datafile >> all.pdb
> done
cubane.pdb
, ethane.pdb
, methane.pdb
, octane.pdb
, and pentane.pdb
would be concatenated and saved to a file called all.pdb
.ethane.pdb
will be saved to a file called all.pdb
.cubane.pdb
, ethane.pdb
, methane.pdb
, octane.pdb
, pentane.pdb
and propane.pdb
would be concatenated and saved to a file called all.pdb
.cubane.pdb
, ethane.pdb
, methane.pdb
, octane.pdb
, pentane.pdb
and propane.pdb
would be printed to the screen and saved to a file called all.pdb
.>>
appends to a file, rather than overwriting it with the redirected output from a command. Given the output from the cat command has been redirected, nothing is printed to the screen.