0
votes
1answer
30 views

sed replace misplaces slashes

I have the following code in a LaTeX file: for \emph{service} in \emph{host}.resources: for \emph{file} in \emph{host}.resources: \underline{service}.requires.add(\underline{file}) ...
2
votes
1answer
74 views

How can I use a back-reference in place of a filename in sed?

I am trying to use sed to scan through a file and find a pattern, then use part of the matched pattern as a filename and insert the contents of the file at that location. I can get most of it to work, ...
1
vote
2answers
98 views

Sed script inserting and appending in wrong place only in one particular place

I am trying to convert man pages to tex, and I keep getting \item[ in the beginning of the file and ] \hfill \\ After the part of the man pages where it shows ENV(1L). Everything else seems to ...
2
votes
1answer
67 views

extracting and copying parts of tex files into new tex files

I have a bunch of tex files in different folders on my system. The goal is to create new tex files (using a template, that has the title page, packages, new commands,...) that combines all the ...
4
votes
3answers
381 views

How to parse a file to extract 3 digits numbers kept in a “group number”

I am a beginner, and trying to write a shell script to parse a text file that is extracted from a standardization pdf file. I would like for each test group (identified by Group 0, Group 1... to get ...