🎴 Flashcard Mode
Hibernate ORM and Unix/Linux Programming Quiz
Card1 / 20
Mastered0
Review0
QuestionClick to flip
16.) To delete all the trailing spaces of each line of file test1
AnswerClick to flip back
A
a) sed 's/[ ][^ ]*$//' test2
💡 Explanation:
The sed command sed 's/[ ][^ ]*$//' matches a space followed by any non-space characters at the end of a line and removes them, effectively stripping trailing spaces from each line of the file.