Changing back slashes to forward slashes

Ramon F Herrera ramon at skye.mit.edu
Fri Aug 17 05:46:44 AEST 1990


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"

but only for the lines that begin with "#include".

As you may have guessed, I am porting a PC-DOS program to Unix.

thanks,

Ramon


--
Ramon F. Herrera
Research Laboratory of Electronics
Massachusetts Institute of Technology
ramon at iona.mit.edu



More information about the Comp.unix.questions mailing list