In: Computer Science
Question 11
1 point possible (graded)
The commands in the pipeline $ cat result.txt | grep "Harvard edX" | tee file2.txt | wc -l perform which of the following actions?
From result.txt, select lines containing “Harvard edX”, store them into file2.txt, and print all unique lines from result.txt.
From result.txt, select lines containing “Harvard edX”, and store them into file2.txt.
From result.txt, select lines containing “Harvard edX”, store them into file2.txt, and print the total number of lines which were written to file2.txt.
From result.txt, select lines containing “Harvard edX”, store them into file2.txt, and print the number of times “Harvard edX” appears.
unanswered
You have used 0 of 2 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
Question 12
0/1 point (graded)
How is git rebase used?
To switch branches or restore working tree files incorrect
Uses a binary search to find the commit that introduced a bug
To reapply commits on top of another base tip
To reset the current HEAD to the specified state
To download objects and refs from another repository
You have used 1 of 2 attempts Some problems have options such as save, reset, hints, or show answer. These options follow the Submit button.
Question 13
1 point possible (graded)
Which of the following statements is wrong about Advanced Unix Executables, Permissions, and File Types?
In Unix, all programs are files/executables except for commands like ls, mv, and git.
which git allows a user to find the path to git.
When users create executable files themselves, they cannot be run just by typing the command - the full path must be typed instead.
ls -l can be used to inspect the permissions of each file.
Question
11:
The commands in the pipeline $ cat result.txt | grep "Harvard edX"
| tee file2.txt | wc -l perform which of the following
actions?
Answer:
From result.txt, select lines containing “Harvard edX”, store them
into file2.txt, and print the total number of lines which were
written to file2.txt.
Explanation:
cat result.txt opens the result.txt file,
grep "Harvard edX" will find the occurrence of Harvard edX,
tee file2.txt will copy the lines containing Harvard edX to
file2.txt
WC -l will print the total number of lines in file2.txt
Question
12:
How is git rebase used?
Answer:
To reapply commits on top of another base tip
Explanation:
No explanation it is the main function of git rebase command go
through git documentation
Question 13:
Which of the following statements is wrong about Advanced Unix Executables, Permissions, and File Types?
When users create executable files themselves, they cannot be run just by typing the command - the full path must be typed instead.
Explanation:
No need of a full path to run user-created executables.