Name-Muskan Agarwal Assignment-1 Codingclub
Name-Muskan Agarwal Assignment-1 Codingclub
Assignment-1
Codingclub
Question-2
#!/bin/bash
#!/bin/bash
1475 https://fundoopush-dev.bridgelabz.com/login
1141 https://fundoopush-dev.bridgelabz.com/dashboard/article
176 https://fundoopush-dev.bridgelabz.com/add-post
74 http://www.google.com/bot.html
Question-9
read -p "Enter the name of folder you want to make " folderName
if [ -d $folderName ]
then
echo "Folder already exists"
else
mkdir $folderName
echo "Making directory $folderName"
fi
Muskan@DESKTOP-EJUM3U4 MINGW64 ~/Desktop/LinuxLearning/Assignment 1
$./FolderExistsOrNot.shell
Enter the name of folder you want to make Temp
Making directory Temp
Question-10
list=`ls`
status=$?
if [ $status -eq 0 ]
then
echo "ls command executed successfully"
else
echo "ls command not executed successfully"
fi
list=`hello`
status=$?
if [ $status -eq 0 ]
then
echo "hello command executed successfully"
else
echo "hello command not executed successfully"
fi
___________________________________________________________________________
Muskan@DESKTOP-EJUM3U4 MINGW64 ~/Desktop/LinuxLearning/Assignment 1
$ ./checkExecutionStatus.shell
ls command executed successfully
./checkExecutionStatus.shell: line 9: hello: command not found
hello command not executed successfully
Question-11
#!/bin/bash
case "$usersecret" in
"") echo "setting environment variable to dH34xJaa23"
usersecret='dH34xJaa23'
;;
*) echo "Environment variable already set"
;;
esac
Question-14
EmployeeName TotalPay
NATHANIEL 567595
GARY 538909