Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Linux Foundation Exam LFCS Topic 4 Question 68 Discussion

Actual exam question for Linux Foundation's LFCS exam
Question #: 68
Topic #: 4
[All LFCS Questions]

Which of the following commands will reduce all consecutive spaces down to a single space?

Show Suggested Answer Hide Answer
Suggested Answer: E

Contribute your Thoughts:

Rueben
6 days ago
Option E looks promising, but I'm not sure if it will handle all consecutive spaces. I'll have to look into the -s flag a bit more.
upvoted 0 times
...
Luis
6 days ago
Hmm, that makes sense too. I guess we'll have to wait and see what the actual answer is during the exam.
upvoted 0 times
...
Edna
13 days ago
I disagree, I believe the correct answer is A) tr '\s' ' ' < a.txt > b.txt because it replaces all occurrences of whitespace characters with a single space.
upvoted 0 times
...
Luis
16 days ago
I think the answer is E) tr -s ' ' < a.txt > b.txt because the -s option squeezes multiple occurrences of the specified character into a single occurrence.
upvoted 0 times
...

Save Cancel