Changing back slashes to forward slashes

Art Neilson art at pilikia.pegasus.com
Fri Aug 17 20:28:57 AEST 1990


In article <1990Aug16.194644.14376 at athena.mit.edu> ramon at skye.mit.edu (Ramon F Herrera) writes:
>
>I have a question for those {sed, grep, awk, tr} wizards out there.
>I'd like to change all the occurrences in a file of a line like this:
>
>#include "dira\dirb\incl.h"
>
>to 
>
>#include "dira/dirb/incl.h"
Gosh, how about this ...
	sed '/^#include/s/\\/\//g' infile > outfile
-- 
Arthur W. Neilson III		| ARPA: art at pilikia.pegasus.com
Bank of Hawaii Tech Support	| UUCP: uunet!ucsd!nosc!pegasus!pilikia!art



More information about the Comp.unix.questions mailing list