Conversation
📝 HackYourFuture auto gradeAssignment Score: 79 / 100 ✅Status: ✅ Passed Test Details |
rafaelhdr
left a comment
There was a problem hiding this comment.
Nice job 👏
You made the assignment with nice advanced bash methods. It is really good.
The only detail I think would be valuable for you is to use the \ for escape some chars.
| 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.
I see. There are some workarounds for this error. You could escape it like this:
echo "console.log('JavaScript works\!');" > src/program.js
The \ is very common for being explicit that the next character should be used as is, and not be used here as an event (in this case, it seems to be an history expansion)
| 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 |
There was a problem hiding this comment.
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)
| 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.
Thank you very much for your feedback, Rafael! I indeed did learn about escaping characters after submitting the assignment 😅
I ended up using it later for some practice scripts and customizing my bash prompt 🤓
No description provided.