Question: f you enter a command that is incorrect, the grading script may attempt to offer a hint or two as to what you are doing
f you enter a command that is incorrect, the grading script may attempt to offer a hint or two as to what you are doing wrong. These hints are often helpful, but can sometimes be irrelevant, particularly if you happen to come up with an approach to the problem that I had not anticipated.
In an earlier assignment, you created a fileAsst directory. Some files have just been placed into that directory, some of which are text files (recognizable as such because their names end with .txt). Now these files are in your fileAsst directory, but your current working directory is the commandsAsst directory.
Give a command to list the names of those text files, using an absolute path to the fileAsst directory as part of your command.
Give a command to list the names of those same text files, using a relative path to the fileAsst directory as part of your command.
The file /usr/share/dict/words contains a long list of words in the English language, one per line, arranged into alphabetical order. This file is normally used as the dictionary for spell checkers.
Suppose you were working a word puzzle and needed a 5-letter word with a lower-case vowel (including y) in the second position, and ending with t.
The remaining letters could be any character that occurs in English words, including upper and lower-case alphabetics, numbers, hyphens, etc. (We will accept the file /usr/share/dict/words as the authority on what constitutes a valid English word and what characters can appear within one.)
What grep command would you use to list the words from /usr/share/dict/words that match this requirement?
You are part of a team working on a large C++ program. The source code for this program is kept in the directory ~cs252/Assignments/commandsAsst/project.
After a certain amount of debate, the team has decided to change the order of the parameters of the function binarySearch. Someone else is actually changing the definition of that function. Your job is to find all the places where that function is called and to make repairs as necessary.
What command would you give to list all calls to that function? You should show the lines of code containing each call and the name of the file from in which each such line occurs. (Its OK to produce a few incidental uses of the function name as well, because you will be inspecting the output before actually making the changes.)
Same problem, but suppose that all you wanted was a list of the source code file names in which the function was mentioned?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
