Question: In this challenge, you will work with redirection to create test inputs for several different programs. Write the output of the command is - la

In this challenge, you will work with redirection to create test inputs for several different programs.
Write the output of the command is -la /bin/to the file/usercode/bindir.dat
HINT: notice /bin? has a slash on the end, this is important otherwise it will not list the directory's contents
Use printf to create a list of numbers that are new line delimited (each value is on a new line) in the file /usercode/numbers. txt
332211991282565122
Example:
printf "33
22
11">/usercode/numbers.txt
The output should look like:
33
22
11
We need to sort the file/usercode/jumbled. dat and write the sorted version to /usercode/sorted. dat
a. We can sort the contents of the file using the sort command, if unsure of how to use the sort command, try sort -help
b. The sorted results must be ordered in numerical order not string order (sort has an argument you can provide for this)
c. Without thine numeric the results might look like this
$ cat /usercode/jumbled.dat I sort
1
14
2
22
3
33
Create a file /usercode/reversed. dat where the/usercode/jumbled. dat is sorted and then reverse the number on each line and save the results into / usercode/reversed. dat, to do this use the command above but add | rev >/usercode/reversed
 In this challenge, you will work with redirection to create test

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!