Ask Computer Engineering Expert

Software Development Tools Assignments

You are required to complete three (3) assignments.

Assignment 1 -

Question 1: Create a subdirectory in your home directory and then in the subdirectory create a file welcome.txt having a short message in it. Try to:

  • set the directory's permission bits so that the owner has executable access.
  • make the subdirectory the current directory;
  • list the subdirectory;
  • display the contents of welcome.txt;
  • create a copy of welcome.txt in the subdirectory.

Repeat the experiment, but the owner has read access.

Give all of the command lines of performing above activities. Finally, answer the following questions.

  • If a directory has "read" permission bit, what operations can you perform on the directory and/or the files in it?
  • If a directory has "executable" permission bit, what operations can you perform on the directory and/or the files in it?

Question 2: Use examples to describe the differences in the substrings matched by the patterns which are specified by the following regular expressions.

  • ab.cd and ab*cd
  • ab.*cd and abb*cd
  • ^abc and ^abc$
  • [abc]d and [^abc]d
  • [A-Z][_a-zA-Z0-9]* and [A-Z_][a-zA-Z0-9]*

(Note the regular expression "x*$" could be described as a line has "zero or more x at the end of the line". An example for "x*$" can be 'a jumping fox')

Question 3: Read find online manual page, then

  • Give the command line of searching for all SUID and SGID programs in /usr/bin
  • Give the command line of listing all the subdirectories in the current directory
  • Give the command line of producing a long listing of all files in /usr/bin whose size are more than 750Kb.

Question 4: List the command line of performing the following activities

  • Use tar to create an archive (don't use the z or j option) of all the files in the current directory.
  • Compress the tar file with gzip.
  • View the contents of archive with gunzip and tar
  • View the contents of archive without using gunzip but use the tar instead. (Hint: find the right option from the man page).
  • Create a subdirectory of the current directory.
  • Use tar to unpack the archive into that subdirectory.

Question 5: Assume you have a simple text file called myfile. Describe what the following sed-command lines do on myfile.

1. sed "s/the/a/g" myfile

2. sed -n "s/[A-Z]/&/gp" myfile

3. sed "32,45 s/[()]//g" myfile

4. sed "/^$/d" file

5. sed "s/\([0-9]\)-\([0-9]\)/\1\2/g" myfile

Here is a sample question, what does sed 's/fox/ox/g' myfile do to the myfile?

Assignment 2 -

Question 1: Create a LATEX document, which should be in 11point font

  • Add a title with your name and the date(for instance Feb 14, 2017)
  • Add a table of contents
  • Add a section introducing yourself and all the courses you enrolled.
  • Include a piece of verbatim text - this might be a program (either Bash script or C code fragment).
  • Add the following unnumbered formulae x = -b±√(b2-4ac)/2a and
  • Typeset the following numbered mathematical formula (1).

2453_figure.png

  • Create a floating table with the caption. It should look just like the one in Table 1, except that the table number will be different(Don't have to use the multirow package).
  • Include a short biography of you, along with your recent photo.

Category

Tool

Command

Description

Editor

emacs

vi

Emacs extensible text editor

Visual editor

Scripting

bash

per1

GNU Bourne-Again Shell

Practical Extraction and Report Language

Document Managment

rcs

LATEX

make

Revision Control System

Document Typesetting Package

Managing Project Utility

Table 1 - Some Unix Utilities

Question 2: Write a well structured Bash script to delete comments from a C program. In Bash script, you may use sed commands or other Linux utilities. The standard comment or commentline in C programs starts with the two-characters token (/*) and ends with the two-character token (*/). Assume that each comment line contains the start and end tokens without any other statements before and after. You need to pay attention to the following cases:

/* a comment line in a C program */

printf("It is /* NOT a comment line */\n");

x = 5; /* This is an assignment, not a comment line */

[TAB][SPACE] /* another empty comment line here */

/* another weird line, but not a comment line */ y = 0;

You can test your Bash script on a C program containing all above four lines. The expected output should look like

printf("It is /* NOT a comment line */\n");

x = 5; /* This is an assignment, not a comment line */

/* another weird line, but not a comment line */ y = 0;

where TAB and SPACE stands for the Tab key strokes or white spaces.

Question 3: Write a short but well structured Bash script that, given the name of a file as an argument, reads the file name and creates a new file containing only those lines which have one word in it. Here is an example of the input file. This is a special text file

There

are 20 students in the class.

[TAB][SPACE] Nearly

half of them are enrolled in FoS. The rest are in Faculty-Of-ES.

The output file from the script should look like

There

[TAB][SPACE] Nearly

Faculty-Of-ES.

Well structured means the script should have the error and robustness checking.

Assignment 3 -

Question 1: Write a makefile that reflects the dependency relationship between a set of C program source files which comprise an application as shown in Figure 1.

2389_figure1.png

The arrows point to the dependent file from the file on which it depends. In other words,

1. The application card-exe is created by linking together the object modules main.o and cards.o and the object library liboutput.a.

2. The object library is built from the object file output.o and deck.o; these object files depend upon their corresponding source files.

3. output.o additionally depends on deck.h

4. The header file cards.h contains calling definition (prototypes) for the functions in cards.o and deck.h containing prototypes for deck.c

5. all files which call functions defined in deck.c will need to include deck.h.

6. main.c calls functions from cards.c and output.c, cards.h and output.h must be included in main.c

Question 2: Use a small text file to experiment with the RCS system. Note that RCS treats all ASCII file the same way; the files do not necessarily be programs, though usually are programs. Specially you should

  • Place a $Log$ keyword in the file
  • Complete a set of check in operations which result in the RCS file structure depicted in Figure 2.

653_figure2.png

You will need to make small changes to the source file between check-in operations.

  • Associate a symbolic name with revision 2.1.1.1
  • Make the branch containing revision 2.1.1.1 the default branch
  • Use rlog to verify the RCS structure.

Give all of the commands or command lines used to perform each of above activities, along with a brief description.

Resource Materials -

Text book:

There are a number of excellent texts about the Unix operating system. Some are brief introductions, while others are much wider in scope. Some texts also include some programming guidance. We have chosen the A Practical Guide to Linux Commands, Editors, and Shell Programming by Sobell. This is an excellent book. It is perhaps less tutorial in style than some other books, but it contains a wealth of detailed, well organized information. While it is not the appropriate choice for someone wanting a quick introduction to Unix, it is ideal as a long term companion.

You may choose to use or consult other Unix texts rather than the recommended text. This is acceptable and as long as you are able to complete the exercises and can cover the conceptual material contained in chapters 2, 3 and 4.

Readings:

These are supporting documentation not covered by the textbook. Also included for your convenience are copies of some Unix man pages. The largest part of the Readings is the complete GNU Make manual, which you should find useful in many other courses.

Course DVD-ROM:

The course DVD-ROM contains a complete pre-installed Virtual Debian system created from the Department's Debian/GNU Linux Distribution.

This DVD-ROM is for emergency use only. It is for students having trouble installing Debian Linux on their computer-they will have access to a Linux distribution that will allow them to do the exercises and assignments without falling behind-while they sort out the problems of their installation.

A virtual operating system is no substitute for an installed operating system- remember this is not the only course you will do that will require access to a Linux operating system-it is far better to install the Operating System rather than rely on a virtual system.

WWW

All course material is available from the Course Home Page accessible via the USQStudyDesk

The course webpage described above is your primary point of contact with the university for this course. You can submit assignments via this site, and also retrieve results and feedback.

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M92494191
  • Price:- $90

Guranteed 48 Hours Delivery, In Price:- $90

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As