Hi this is my first time writing bash and I'm trying to practice creating a bash script and am attempting to do the following:
- Using absolute path the script changes directory to your home directory.
- Next it verifies whether a subdirectory called project exists. If it does not exist it creates that directory.
- Next it changes directory moving into the project subdirectory using relative path.
I'm already stuck on the first step:
#!/bin/bash
cd
if [ -d ./project ]
then
echo hi it exists!
else
echo it doesn't exist!
cd project/
I would appreciate if someone could help! thank you so much!