LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Need Advise in writing a Shell script using sed (https://www.linuxquestions.org/questions/linux-newbie-8/need-advise-in-writing-a-shell-script-using-sed-4175501777/)

suDoh! 04-15-2014 03:34 AM

Need Advise in writing a Shell script using sed
 
Hey folks,

I have came across a question to create a script that shows lines containing trailing white spaces from a file implementing the sed editor.

My question is how do I check for trailing whitespaces using sed.

Footnote: sed always drives me crazy! :banghead:

Cheers.

pan64 04-15-2014 04:41 AM

what have you tried? How sed drives you crazy?
you need to construct a regexp to find lines containing trailing whitespaces. You can find a lot of pages by google, like this: https://www.linkedin.com/groups/SED-...299.S.77877460

suDoh! 04-15-2014 04:50 AM

Hey pan64,

Thanks for the URL... I'll check those and see if it helps.

Cheers.


All times are GMT -5. The time now is 11:08 PM.