Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

Students also viewed these Databases questions