hi Team
My output is is not getting PASS for this Q4 of Lab Variables . Can you please help me identifying what is the issue here ?
Why Canada is not getting printed when the script is being run ?
Question
Another script by the name `create_files.sh` is placed in your home directory at `/home/bob` .
This script creates files by making use of variables. However, there is something wrong with the script, and not all the files have been created. Please fix it.
Check
* *info_outline* Hint
* Tasks not completed!
* Script is fixed
Creating file called Japan Creating file called Egypt Creating file called
Output
bob@caleston-lp10:~$ cat create_files.sh
FILE01="Japan"
FILE02="Egypt"
FILEO3="Canada"
cd /home/bob
echo "Creating file called $FILE01"
touch $FILE01
echo "Creating file called $FILE02"
touch $FILE02
echo "Creating file called $FILE03"
touch $FILE03
bob@caleston-lp10:~$
bob@caleston-lp10:~$
bob@caleston-lp10:~$ bash create_files.sh
Creating file called Japan
Creating file called Egypt
Creating file called
touch: missing file operand
Try 'touch --help' for more information.
bob@caleston-lp10:~$
bob@caleston-lp10:~$ ls -al
total 92
drwxr-xr-x 1 bob bob 4096 Nov 24 12:20 .
drwxr-xr-x 1 root root 4096 Apr 14 2020 ..
drwxrwxr-x 2 bob bob 4096 Apr 27 2020 .aws
-rw------- 1 bob bob 2571 May 23 2020 .bash_history
-rw-r--r-- 1 bob bob 70 Nov 24 11:53 .bashrc
drwx------ 3 bob bob 4096 Apr 27 2020 .cache
drwx------ 3 bob bob 4096 Apr 21 2020 .gnupg
drwx------ 4 bob bob 4096 Apr 27 2020 .local
-rw-rw-r-- 8 bob bob 135 Apr 27 2020 .profile
drwx------ 2 bob bob 4096 Apr 15 2020 .ssh
-rw------- 8 bob bob 7838 Apr 27 2020 .viminfo
-rw-r--r-- 1 bob bob 75 Nov 24 11:53 .vimrc
-rw-r--r-- 1 bob bob 0 Nov 24 12:20 Egypt
-rw-r--r-- 1 bob bob 0 Nov 24 12:20 Japan
-rwxr-xr-x 1 bob bob 273 Nov 24 12:08 _bkp
-rwxrwxrwx 1 bob bob 199 Nov 24 12:09 backup-file.sh
-rwxr-xr-x 1 bob bob 273 Nov 24 11:57 create-and-launch-rocket
-rwxr-xr-x 1 root root 273 Nov 24 12:11 create-and-launch-rocket_bkp
-rwxrwxrwx 1 bob bob 213 Nov 24 12:20 create_files.sh
drwxr-xr-x 2 bob bob 4096 Nov 24 11:57 lunar_mission
-rwxrwxrwx 1 bob bob 61 Nov 24 12:05 print-uptime.sh
-rwxrwxrwx 1 bob bob 140 Nov 24 11:59 print-welcome-message.sh
bob@caleston-lp10:~$