Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Programming in Unix ariables the section Setting User-Defined Variables in Chapter 6 of the textbook a. This command has two errors: $ nisen number =42

Programming in Unix

image text in transcribedimage text in transcribedimage text in transcribed

ariables the section "Setting User-Defined Variables" in Chapter 6 of the textbook a. This command has two errors: $ nisen number =42 - What are the errors? - Re-write the command without the errors b. This command has two errors (look closely!): $ belllonstring = Hello world - What are the errors? - Re-write the command without the errors c. Given that the variables above have been defined correctly, what will be the output of these commands? \$ echo niser number hellon string \$ echo \$aisen number \$helllo string d. In order to make the nice number global rather than a local, I wrote this command, it has one error: $ export \$nicen number. - what is the error? - re-write the command without the error. lead the section of Lecture ' 3 on : "Appending to varialbes". e. Given this command: \$ string_1=" abc-def-ghin" - Write the command that would append these two strings to the end of string_1: "-jkst" "-mno" f. Given these commands: \[ \begin{array}{l} \$ \text { string_3=hello } \\ \$ \text { string_4="how" } \\ \$ \text { string_5="are you?" } \end{array} \] - Write a command that appends the contents of string_4, and string_ 5 to the value of string_3. string_3 should end up as "hello how are you?" Note: You must use the string_4 and string_5 variables in your answer. g. Given directory tree A, write commands to create two local variables the containing the absolute paths to - dirA in directory tree A, call it DIR_A - letc in the root directory, call it ETC h. Using the variables DIR A and ETC, write commands to do the following - Create an etcData directory underneath DIR_A - Copy the files in ETC that end in a period followed by three letters (.imi . cfg, and so-on) into the etcData directory. You must use the DIR_A and ETC variables to do this

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

Big Data, Mining, And Analytics Components Of Strategic Decision Making

Authors: Stephan Kudyba

1st Edition

1466568704, 9781466568709

More Books

Students also viewed these Databases questions

Question

Some income from capital is taxed twice. Explain.

Answered: 1 week ago