-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implemented Shell Tasks #3
base: main
Are you sure you want to change the base?
Conversation
Added 'README.md' for good understanding.
Created file.txt with Helo world in it.
Changed world to everyone.
Created .gitignore and added ignore_folder into .gitignore.
Added .sh files of tasks 1-6 to Github.
Added .sh files of cronjob task onto git.
Created .dotfile to modify PS1 as asked.
Added .sh files of tasks 1-6 to Github.
Added .sh files of tasks 1-6 to Github.
Added .sh files of tasks 1-6 to Github.
Added .sh files of tasks 1-6 to Github.
Added .sh files of tasks 1-6 to Github.
Added .sh files of cronjob task onto git.
Added .sh files of cronjob task onto git.
Added .sh files of cronjob task onto git.
Updated task9 for copying the script to home.
Updated task 8 to add time to the image made.
Task 7 was redundant, so, removed
Changes were made in the tasks that are as follows: - Added comments - Deleted task 7 as it was redundant. - Updated task 8, so that it can run without arguments.
Updated README.md to add following details: - A brief overview of the scripts - Execution information of the scripts
Deleted task9 to - Rename task8 to task7 - Rename task9 to task8
Updated tasks as follows: - updated the comments - renamed task 8 and 9 to task 7 and 8
make includes a heading. |
|
Give this PR a proper name. Read about PR naming conventions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly make requested changes in all other places where required.
README.md
Outdated
|
||
The project contains 8 distinct tasks. | ||
- Task 1 focuses on searching for a specific file within a designated folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Task 1 focuses on searching for a specific file within a designated folder | |
- task 1 focuses on searching for a specific file within a designated folder |
README.md
Outdated
The project contains 8 distinct tasks. | ||
- Task 1 focuses on searching for a specific file within a designated folder | ||
- Task 2 is responsible for creating files in one folder, copying them to another folder, and swapping the names of the two folders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Task 2 is responsible for creating files in one folder, copying them to another folder, and swapping the names of the two folders. | |
- task 2 is responsible for creating files in a folder, copying created files to another folder, and swapping the names of the two folders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make changes in the next tasks accordingly.
README.md
Outdated
``` | ||
|
||
- Task 2, 8 and Task 3 is a simple task. To run this you only have to right the name with leading ./ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Task 2, 8 and Task 3 is a simple task. To run this you only have to right the name with leading ./ | |
- To execute tasks 2, 3 & 8 |
README.md
Outdated
``` | ||
./task7 -p path | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- In task 7 you can give only name or path or resolution in the following way: | |
``` | |
./task7 -p path | |
``` |
@@ -0,0 +1 @@ | |||
PS1="[\t] \w > " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use proper commenting format in this file
Scripts/task2.sh
Outdated
|
||
echo "creating files" | ||
|
||
# creating 4 files in task2 folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# creating 4 files in task2 folder | |
# creating files in task2 folder |
Scripts/task2.sh
Outdated
|
||
echo "creating folder task2_temp" | ||
|
||
# making 2nd folder task2_temp in task2 folder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# making 2nd folder task2_temp in task2 folder | |
# making folder task2_temp in task2 folder |
Scripts/task2.sh
Outdated
|
||
echo "copying files" | ||
|
||
# copying 3 files in task2 into task2_temp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# copying 3 files in task2 into task2_temp | |
# copying files in task2 into task2_temp |
file.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose of adding this file here?
Ok |
file.txt had no purpose
Updated README.md to add following details: - A brief overview of the scripts - Execution information of the scripts - Made more readable
- Comments formatting was corrected in task1 - Comments were made more reader friendly
Created .dotfile to modify PS1 as asked.
Updated README.md to add following details: - A brief overview of the scripts - Execution information of the scripts - Made more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra spaces & increase code readability
Scripts/task1.sh
Outdated
local folder=$2 | ||
# looping through the directory | ||
for entry in "$folder"/*; do | ||
# if directory then call the function again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write a proper comment. " if directory then " ?
Scripts/task1.sh
Outdated
# if directory then call the function again | ||
if [ -d $entry ]; then | ||
search_file "$file" "$entry" | ||
# if file then search if file is the one we were looking for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
write proper comment
Scripts/task7.sh
Outdated
# site for downloading image | ||
site="https://source.unsplash.com/$res/" | ||
# downloading the image | ||
wget -q -O "$directory" $site |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# site for downloading image | |
site="https://source.unsplash.com/$res/" | |
# downloading the image | |
wget -q -O "$directory" $site | |
# site for downloading image | |
site="https://source.unsplash.com/$res/" | |
# downloading the image | |
wget -q -O "$directory" $site | |
Scripts/task7.sh
Outdated
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
README.md issues
README.md
Outdated
### Execution | ||
|
||
- Before actually executing any task you have to change the mode of that script to execution: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Before actually executing any task you have to change the mode of that script to execution: | |
Before actually executing any task you have to change the mode of that script to execution: |
README.md
Outdated
## Description | ||
|
||
The project contains 8 distinct tasks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The project contains 8 distinct tasks. | |
The project contains 8 distinct tasks: |
README.md
Outdated
The project contains 8 distinct tasks. | ||
- task 1 focuses on searching for a specific file within a designated folder | ||
- task 2 is responsible for creating files in a folder, copying created files to another folder, and swapping the names of the two folders. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't put full stop at end if you are using bullets.
Updated README.md to add following details: - A brief overview of the scripts - Execution information of the scripts - Made more readable
- Added proper comments - Made task7 more readable
Includes