[NTLUG:Discuss] dealing with backslashes '\' when 'read'ing files..

Eric Schnoebelen eric at cirr.com
Sat Feb 18 05:45:06 CST 2006


"Richard Geoffrion" writes:
- Error: Makefile:184: *** missing separator.  Stop.
- 
- --my take on the issue based on my research--
- 
- ----
- 
- What do you call those multi-line bash lines \
- that continue on the next line so that\
- there aren't long lines in the editor?

	escaped newlines.

- Issue:  Script parses a Makefile line-by-line searching to remove a string
- but gets tripped up when encountering those baskslashed end of line lines.

	Why not just use sed to make the transformation on the
entire Makefile, rather than trying to have a shell script
do the transformations line by line?

	For your "Script-so-far", it becomes:

	sed -e 's#/usr/include/sys/stdyms.h##g' Makefile >Makefile.new

--
Eric Schnoebelen		eric at cirr.com		http://www.cirr.com
	Now and then an innocent man is sent to the legislature.




More information about the Discuss mailing list