Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

directary to the nuw one. Exercise 2. (9p. - 3 fot each comanand) Create and odit the toxt file exercise2 txt in the previously created

image text in transcribed

directary to the nuw one. Exercise 2. (9p. - 3 fot each comanand) Create and odit the toxt file exercise2 txt in the previously created directory T1. 11 and write in the first line your full name, student ID number and computer number. Next write (after tusting in the terninal!) commands that perform the following thsks (use filters and redirections if necessary): 1) Count the toral number of finst level subditertories from folder /usr/1ib with namrs eaded with two digits The output shonld be similat to the following: "Total number of selected subdirectories is: 7 " 2) Write to file list-a txt in curreut directury all regula file nawes up tu 3 characters long only, togecher with their sixes and owner names from directory /hin 3) Count the total namber of current logill sessions of all users with the second charucter of Ingin names being not a vowel The nutput should be similar to the fnllowing: "Total number of selected sesaions is: 11 " Exercise 3. (6p.) Write. test and save in the previonsly created directory TL-11 the script named test11 sh that perfurrus the following task: In the script check the number of its parameters aud stop executiug it if that number is less than one. The seript should cwate in your home directory text files with names "shel1 txt", where instead of word "shell" should be the login shell name being the script parametes The srript should write to this file the list of all login names ended with two vowels, as well as full names and user ID (the third field in /etc/passsd) of all users having as the login sheil the one being the scripl parameter. Eg If the script was executed with parameters: "/sh bash" then the script should create two files 2 sh. txt and bash. txt with contents similar to the following: useleoi-JohnBrosn.6234ioutoa-EveGreen6524 In the last line ot the seript add as a comment your full name, student ID number and login name on the xor server. Mininal ummer of points to pass: 12

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions