-
Suppose we have a file
directories.txt
where each line contains the name of a directory that we want to create. Our friend proposes that we runcat directories.txt | mkdir
into order to do this? Will this command work? If not, how can we change this command to get it to work/could we improve it in any way? -
Come up with a general statement about when we need to use the
xargs
command. -
Suppose we want to run
Mystery.java
and save standard output to a file and have it print standard output to the console. How would we achieve this? -
Again, suppose we are running
Mystery.java
. This time, however, we want standard output and standard error to print to the console, in addition to having all output printed toout1.txt
. How would we achieve this? -
Suppose we have the
intro_survey.csv
from the previous homework assignment. Usingcut
, how many unique answers were there to the question “what is your favorite candy”? -
Write a command that would delete all directories, recursively, starting from the current directory. Be careful about where you run this command!!