[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

OT: Makefile & sed-Problem



Dear all,

although I know it isn't anything that directly refers to Debian, I
dare to post since I have seen many similar questions.  Please excuse!

The Problem: from a friend, I receive text-files that have a lot of
whitespace before the end of a line or even lines consisting of only
whitespace.  For this reason, I set up a Makefile that would remove
all whitespaces:
##
receive: 
  cat in_file \
  | sed -e 's/\s*$$//' \
  > new_in_file
##
I expect this to remove all whitespaces '\s*'ending a line.

But, funny enough, it removes all 's' ending a line.  This has been
driving me mad for a couple of hours.... that's why I dare to post.

What's wrong with 's/\s*$$//' in a Makefile?
I tried 's/\\s*$$//' -- with no success.

Hopefully someone immediately sees the problem and can give me any
hint.

Thanks in advance,

wbr,
Lukas
-- 
Lukas Ruf           | Wanna know anything about raw |
<http://www.lpr.ch> | IP?  <http://www.rawip.org>   |



Reply to: