The following snippet will run in a linux terminal.
You can copy it, paste into the terminal of the CodeSpace - and it will run. You may have to hit <ENTER> to execute the very last command too.
But Before you actually run it - try to guess (make your notes in the comments)
[x] What will happen when you run it?
[x] Will it actually work as it is - or do you need to correct anything?
[x] What programming language is this?
mkdir samples
mkdir samples/animals
mkdir samples/animals/countries
mkdir samples/animals/countries/movies
ANIMALS=('Apes' 'Elephants' 'Elephant babies' 'Monkies' 'apes')
COUNTRIES=('Denmark' 'Sweden' 'USA' 'France' 'Italy' '.apes' 'North Korea')
MOVIES=('Batman' 'Sex And The City' 'JFK' 'Poltergeist' 'Germany')
cd samples/animals
for id in ${ANIMALS[@]}
do
echo $id >> $id.txt
done
cd countries
for id in ${COUNTRIES[@]}
do
echo $id >> $id.txt
done
cd movies
for id in ${MOVIES[@]}
do
echo $id >> $id.txt
done
[x] Did it actually work as expected - comment on this in the issue.
The following snippet will run in a linux terminal.
You can copy it, paste into the terminal of the CodeSpace - and it will run. You may have to hit
<ENTER>
to execute the very last command too.But Before you actually run it - try to guess (make your notes in the comments)
[x] What will happen when you run it?
[x] Will it actually work as it is - or do you need to correct anything?
[x] What programming language is this?
[x] Did it actually work as expected - comment on this in the issue.