Here's how it works:
tr is a command-line utility that translates or deletes characters in a stream of data.
-s is an option for tr that squeezes multiple consecutive occurrences of a character into a single occurrence.
' ' is the character that you want to squeeze, which in this case is a space.
< a.txt is a shell redirection that takes the contents of the file a.txt as input to the tr command.
> b.txt is a shell redirection that sends the output of the tr command to the file b.txt.
So, the overall effect of the command is to read the contents of the file a.txt, replace all consecutive spaces with a single space, and write the modified contents to the file b.txt.
upvoted 1 times
...
This section is not available anymore. Please use the main Exam Page.LX0-103 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
linux_admin
2 years, 2 months ago