Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!nostromo.cc.purdue.edu!ksb From: ksb@nostromo.cc.purdue.edu (Kevin Braunsdorf) Newsgroups: comp.unix.questions Subject: Re: Make and '#' Summary: use tr(1) and a @ Keywords: #, @, make, tr Message-ID: <12073@mentor.cc.purdue.edu> Date: 8 May 91 19:41:51 GMT Article-I.D.: mentor.12073 References: <470@mailgzrz.tu-berlin.de> <1991May08.142055.12744@cs.ruu.nl> <476@mailgzrz.tu-berlin.de> Sender: news@mentor.cc.purdue.edu Organization: PUCC UNIX Group Lines: 19 I've needed # in shell commands in make before. I had to use tr(1) to get them... here is an example from an old Makefile.... OLDCODE= ${CC} ${CFLAGS} -E $$file |\ sed -n -e `echo '/^@/p' |tr "@" "\043"` |\ sed -e 's/^.[ 0-9]*"\(.*\)" *$$/\1/' -e '/\/usr\/include/d' Note that $ echo '/^@/p' | tr "@" "\043" outputs /^#/p which is the string I need to pass sed -e... (yes, I know one sed would do). -- "Anything I could have said I felt, somehow, you already knew..." kayessbee, Kevin Braunsdorf, ksb@cc.purdue.edu, pur-ee!ksb, purdue!ksb