I have some problems in using sed in conjunction with HALM I show the following sample problem:
html = "& lt; html> gt; body & gt; enterlet & lt; / body & gt; & lt; html & gt;" Table = "& lt; table & gt; & lt; / table & gt;" Echo $ HTML | Sed -es / enter / $ table /
This output:
sed: -e expression # 1, char 18: unknown option for s ' If I leave /
to $ table
, then it will be and lt; Table & gt; & Lt; Table & gt;
This works fine.
Any ideas about fixing it?
Update
Here is a sample that can reproduce the problem: / P>
template.html:
< Code> & lt; Html & gt; & Lt; Body & gt; & Lt; Table & gt; Entries & lt; / Table & gt; & Lt; / Body & gt; & Lt; / Html & gt;
gui_template:
& lt; Tr & gt; & Lt; Td square = "td_tut_title" & gt; TITLE & lt; / Td> & Lt; Td square = "td_tut_content" & gt; & Lt; A href = "../ tutorial / GUI / FILENAME" & gt; & Lt; Img src = "img / bbp.png" alt = "bbp" /> & Lt; / A & gt; & Lt; / TD & gt; & Lt; / TR & gt;
genhtml.sh:
#! / Bin / bash html = `cat template.html` entries =` cat gui_template | Sed -e s / FILENAME / test / | Sed -e s / TITLE / title / `DELIM = $ '\ 377' resonance $ HTML | Sed -e "$ {DELIM} entrees $ {DELIM} $ ENTRIES $ {DELIM}"
Output:
~ / htmlgen $ ./ Genhtml .sh sed: -e expression # 1, variable 14: aborted 's command'
For example, use @ different delimiter
$ HTML echo Sed -es @ Entry @ $ TABLE @
Comments
Post a Comment