Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

2. Launch tmux and split the terminal into two vertical panes. 3. 15pts. Using for loop in CLI : 3.1. In the left pane, process

2. Launch tmux and split the terminal into two vertical panes.

3. 15pts. Using for loop in CLI :

3.1. In the left pane, process the contents of /etc directory to print filemode, filesize, and filename of text files using a for loop, command substitution, and pipes.

a) Use ls -1 /etc when creating the list in the for statement.

b) In the body of the loop, use test command to see if the entry is a file or a directory.Proceed only if it's a file, ignore if it's a directory. Note that you will need to prepend /etc to filename because ls -1 returns only the filename as in ls -l /etc/$_FNAME.

c) Use tr command to squeeze multiple blanks into one blank in each line, like tr -s' ' .

d) Use cut command to select individual fields in an input line.

e) Use tr command again to translate field separator, aka delimiter, blank to a tab as in tr ' ' '\t' .

f) 0pts. Use head command to limit the size of listing.

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_2

Step: 3

blur-text-image_3

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

Introduction to Wireless and Mobile Systems

Authors: Dharma P. Agrawal, Qing An Zeng

4th edition

1305087135, 978-1305087132, 9781305259621, 1305259629, 9781305537910 , 978-130508713

More Books

Students also viewed these Programming questions