sr320 / course-fish546-2018

7 stars 2 forks source link

Unix commands #12

Closed sr320 closed 5 years ago

sr320 commented 5 years ago

What does the second line of the following code do?

tr -cs A-Za-z '\n' |
tr A-Z a-z |
sort |
uniq -c |
sort -rn |
sed ${1}q
grace-ac commented 5 years ago

The second line translates (changes) all uppercase letters to lowercase letters.

magobu commented 5 years ago

Translate all uppercase letters to lowercase from chapter 7 in our textbook. The whole 7 line Unix scrip, by McIlroy, was a reply to the seven-page literate program to count and write the k most common word in a file written by Knuth.

yaaminiv commented 5 years ago

Converts all uppercase letters to lowercase letters

kimh11 commented 5 years ago

Converts all uppercase letters (A-Z) to lowercase (a-z) and send the standard output to the next command.

Jeremyfishb commented 5 years ago

Translates all upper case letters to lower case letters and send the standard output to the next command.

kcribari commented 5 years ago

The line tr A-Z a-z | translates the uppercase alphabet to a lowercase alphabet in the pipeline.

hgloiselle commented 5 years ago

it translates the uppercase letters to lowercase ones.

wsano16 commented 5 years ago

It translates all uppercase letters to lowercase letters and passes the output via a pipe to the next line of code.

jgardn92 commented 5 years ago

It translates all characters that are UPPER CASE alphabet letters to lowercase alphabet letters.

zscooper commented 5 years ago

This line of code uses the translate function tr to change all UPPERCASE letters to lowercase.

calderatta commented 5 years ago

The second line of code takes the input from the previous line, and translates (using the 'tr' function) all uppercase letters ('A-Z') to lowercase letters ('a-z'), then pipes the output to the following command.

melodysyue commented 5 years ago

The second line of code tr A-Z a-z | translates all UPPERCASE letters to lowercase.

laurahspencer commented 5 years ago

Yes what they said, translates/converts uppercase to lowercase. (sorry, late to the game here)