shell - Renaming lines in a document using unix commands (Bash) -


I have a txt document that is a list of items. Each row has a different name / title but for this example I Must have to stay with the name.

For example:

  font0.tff font1.tff font2.tff font3.tff font4.tff   

I would like < Code> and Lieutenant; Items & gt; & Lt; / Item & gt; Tags:

  & lt; Item & gt; Font0.ttf & lt; Keeping each row between / item & gt; change the program to the following; & Lt; Items & gt; Font1.ttf & lt; / Item & gt; & Lt; Items & gt; Font2.ttf & lt; / Item & gt; & Lt; Items & gt; Font3.ttf & lt; / Item & gt; & Lt; Items & gt; Font4.ttf & lt; / Item & gt; By using  sed     

: < Pre> sed 's # font \. (. * \) # Font \ 1.ttf - & gt; & Lt; Items & gt; Font .1 & lt; / Item & gt; # 'Infile & gt; Outfile

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -