-
Notifications
You must be signed in to change notification settings - Fork 19
Jawad A. #21
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
base: main
Are you sure you want to change the base?
Jawad A. #21
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,25 @@ | ||
| # Write your code here | ||
| #!/usr/bin/env bash | ||
|
|
||
| echo "Creating project..." | ||
| git init project | ||
| cd project/ | ||
| mkdir -p {resources,src/{database,profile}} | ||
| touch README.md resources/{family-picture.jpg,icon.png,logo.png} settings.conf src/program.java | ||
| git add . | ||
| git commit -m "Initial commit" | ||
| sleep 3 | ||
| echo "Setup project..." | ||
| echo "Welcome to my project" > README.md | ||
| rm -r src/profile | ||
| rm resources/family-picture.jpg | ||
| git commit -a -m "Project setup and removed personal file" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good description 👍
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you very much for your feedback, Rafael! I indeed did learn about escaping characters after submitting the assignment 😅 |
||
| sleep 3 | ||
| ls -l resources/ | ||
| echo "Setup javascript..." | ||
| mv src/program.java src/program.js | ||
| # [ERROR] "bash: !': event not found" if exclamation mark included, hence removal | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see. There are some workarounds for this error. You could escape it like this:
The |
||
| echo "console.log('JavaScript works');" > src/program.js | ||
| node src/program.js | ||
| git commit -a -m "Setup javascript environment" | ||
| ls -l $HOME/ | ||
| echo "All done!" | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| <paste here your github username> | ||
| jivvyjams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Very advanced way to create files 👏
There is just a typo in the
family-picture.jpg(which should have a space instead of-)I assume you were having problems with spaces. But you can use it by escaping (use
\before the space)