Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create some sample files #79

Open
4 tasks
lakruzz opened this issue Jan 25, 2023 · 0 comments
Open
4 tasks

Create some sample files #79

lakruzz opened this issue Jan 25, 2023 · 0 comments
Labels
template Included in the template

Comments

@lakruzz
Copy link
Member

lakruzz commented Jan 25, 2023

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)

  • What will happen when you run it?
  • Will it actually work as it is - or do you need to correct anything?
  • 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
  • Did it actually work as expected - comment on this in the issue.
@lakruzz lakruzz added the template Included in the template label Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
template Included in the template
Projects
None yet
Development

No branches or pull requests

1 participant