I'm doing a project based on shell scripting where I have several questions that I need to write a script that would execute itself on bash. There's five questions (some questions are split up into sections).
1.
A) Write a shell script called [login to view URL] that displays a message like the one shown here:
$ ./[login to view URL]
Hello! This is module CO2017.
The current directory is /the/current/directory.
Please note: Except that "/the/current/directory" should be replaced with the path of the actual directory where the script is executed.
B) Write a shell script called [login to view URL] that displays a message saying whether or not the working directory is your home directory (by referring to the environment variable $HOME).
$ ./[login to view URL]
Not in HOME directory
$ cd $HOME
$ /path/to/CO2017/scripts/[login to view URL]
In HOME directory
2.
A) Write a shell script called [login to view URL] that takes a list of file names as command-line arguments and searches all of them when it is invoked for the username of the current user. As output it should display the line of each occurence plus the one line before and after. For example, invoked by user gtl1 would produce something like this:
$ ~/CO2017/[login to view URL] test1 test2
test1-On the other hand, we denounce with righteous indignation and dislike
test1:gtl1 who are so beguiled and demoralized by the charms of pleasure of
test1-the moment, so blinded by desire, that they cannot foresee the pain
--
test1-saying through shrinking from toil and pain. These cases are perfectly
test1:simple and easy to distinguish. In a free hour, when gtl1's power of
test1-choice is untrammelled and when nothing prevents our being able to do
--
test1-have to be repudiated and annoyances accepted. The wise man therefore
test1:always holds in these matters to this principle of selection: gtl1
test1-rejects pleasures to secure other greater pleasures, or else he
--
test2-Far far away, behind the word mountains, far from the countries
test2:Vokalia and Consonantia, there live the gtl1. Separated they
test2-live in Bookmarksgrove right at the coast of the Semantics, a large
test2:language ocean. A small river named gtl1 flows by their place and
test2-supplies it with the necessary regelialia. It is a paradisematic
--
test2-text by the name of Lorem Ipsum decided to leave for the far World of
test2:Grammar. gtl1 advised her not to do so, because there were
test2-thousands of bad Commas, wild Question Marks and devious Semikoli, but
B) Write a shell script called [login to view URL] that takes a directory path as a command line argument and displays the following for the contents of that directory:
the plain files in the specified directory (one level only, do NOT descend into sub-directories) which were most recently modified more than 72 hours before the script is run;
the directories (not plain files) in sub-directories of the specified directory where the directory name begins with the string "dir" (not including quote marks).
$ ./[login to view URL] /s_home/gtl1/CO2017
Plain files modified more than 72 hours ago in /s_home/gtl1/CO2017:
/s_home/gtl1/CO2017/[login to view URL]
/s_home/gtl1/CO2017/[login to view URL]
Directories in sub-directories of /s_home/gtl1/CO2017 starting with "dir":
/s_home/gtl1/CO2017/abc/dir1
/s_home/gtl1/CO2017/xyz/dir6
Please note that there are more questions so if you are interested in this I will be giving you more questions.
Hello
Looks like this is an assignment.. I can help you to write this. You can review my profile and if interested please contact me. As today is late for me, i can do this for tomorrrow.
Thank You
£21 GBP in 1 day
5.0 (25 reviews)
4.8
4.8
8 freelancers are bidding on average £25 GBP for this job
Hello. Lots of sysadmin experience here. I would love to work on those scripts for you. I'm ready to proceed right away. How many questions are there in total and can you please list all of them at once so I can estimate the volume of work? Thank you.
Hi
I am an devops engineer experienced with linux systems for more than 4 years. I am well experienced in using shell scripting , bash scripting and other scripting like python to linux monitoring and task automation. I can create you required shell scripts. Please message to discuss further on this
Thanks
Note-please check my profile for past projects and reviews.
Hi...Going through the requirements to be completed for all of the shell questions, I think I can get it done within 2 days.
please ping me to discuss further.
thanks and regards,
data soolutions