Homework: Make a one-line Unix command - using pipe(s)

Task A: Make a one-line Unix command - using pipe(s) - to display the number of files in your home directory including the hidden files that begin with '.'

Task B:Make a one-line Unix command - using pipe(s) - to display the number of unique zip codes in famous.dat (hint: use -u on sort)

Task C: Using the fixed length field file called famous.dat, make a one-line Unix command - using pipe(s) - to display an alphabetical list of the last and first names in upper case of the last 8 people in the file. Hint: Names are in columns 6 through 35. Make the output will look like this...

DARWIN CHARLES
EINSTEIN ALBERT
GALILEO GALILELI
GOLDMAN EMMA
LOVELACE ADA
MANDELA NELSON
PARKS ROSA
RUSSELL BERTRAND

Task D: Using the fixed length field file called famous.dat, make a one-line Unix command - using pipe(s) - to display a list of last name, first name and zip only. Sort first on the zip code, then on last name when there are duplicate zip codes. To save on amount of output produced, just display the first 15 lines of the output from the above, as the last command in the pipe. Hint: zip codes are in columns 44 through 48.

Task E: Write a one-line Unix command using pipes, to display just the current day of the week in lower case (i.e. mon, tue, etc.). Hint: Cut the first part of the date command then pipe to tr.

Yes it's my homework but It's confusing:wall: even when i'm reading the materials for each task. If anyone can help me that'll be awesome.

Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.

1 Like