Hi All ,
Lab: Creating your first shell script
I have created a shell script and added the commands ( PFA image ) . Still the task is failing. Can someone guide me as why this is failing ?
Thanks,
Rakesh
Hi All ,
Lab: Creating your first shell script
I have created a shell script and added the commands ( PFA image ) . Still the task is failing. Can someone guide me as why this is failing ?
Thanks,
Rakesh
Hello, Raki3101
Have you still facing the issue?
You need to read the instructions again, your script is named slightly differently to what it has asked you to create (you have added a bit that is not needed)
Thanks Rosarch. I got it what the mistake is. I need to save it as a command without .sh extension to the script.
Same lab not working for. Appreciate your help.
ob@caleston-lp10:~$ cat create-and-launch-rocketcat: create-and-launch-rocket: No such file or directory
bob@caleston-lp10:~$ cat create-and-launch-rocket.sh
cat: create-and-launch-rocket.sh: No such file or directory
bob@caleston-lp10:~$
bob@caleston-lp10:~$ echo $PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
bob@caleston-lp10:~$ export PATH=$PATH:/home/bob
bob@caleston-lp10:~$ which create-and-launch-rocket
bob@caleston-lp10:~$ which create-and-launch-rocket
bob@caleston-lp10:~$
This lab is not working for me. I tried it couple of times per instruction. Appreciate your help.
Hello, @Jhasujay
I think you are doing wrong way. You have to use vi editor to write command into the file create-and-launch-rocket
.
First you can create file with the touch command.
touch create-and-launch-rocket
then use vi editor.
vi create-and-launch-rocket
OR
You can use direct vi editor.
vi create-and-launch-rocket
Hope it will help.
Thank you for your quick response. It worked. I am new to Linux/Shell scripting …
Hi All;
At bellow lab;
Create a shell script in the home directory called create-directory-structure.sh
. The script should do the following tasks:
/home/bob/countries
- USA
, UK
, India
capital.txt
Washington, D.C
, London
, New Delhi
uptime
of the systemwhen ı wanna run script ı saw on cli
bob@caleston-lp10:/home$ create-directory-structure.sh
05:22:45 up 1:01, 0 users, load average: 3.07, 2.82, 3.17
I saw every step made by script
I made also
echo $PATH
then
export PATH=$PATH:/home
But at the end
Script did not run successfully. Please inspect your script and try again.
ıs there any one live same problem?