Đang Thực Hiện

sed script, multi-line replace

We're in need of a sed script to do the following:

Take an input file (see below for sample file)

Replace:

\begin{tabular}{|l|l|l|}

with

\begin{tabular}{|l|r|r|}

Delete all instances of the following patterns:

Pattern 1:

0&0&0\

\hline

Pattern 2:

\colorrow 0&0&0\

\hline

Pattern 3:

0&&\

\hline

Pattern 4:

\colorrow 0&&\

\hline

And save the result to another file. Sed only please (yes, you can do it with AWK, thank you)

If you know what you're doing this shouldn't take too long at all.

Sample file:

\def\colorrow{\rowcolor[gray]{0.50}}

\begin{tabular}{|l|l|l|}

\colorrow Email features&5&4\

\hline

Anonymous user support&5&5\

\hline

\colorrow Survey response&5&4\

\hline

Admin survey response report&8&5\

\hline

0&0&0\

\hline

\colorrow 0&0&0\

\hline

0&0&0\

\hline

\colorrow 0&0&0\

\hline

0&0&0\

\hline

\colorrow 0&0&0\

\hline

0&0&0\

\hline

\colorrow 0&0&0\

\hline

0&0&0\

\hline

\colorrow 0&0&0\

\hline

0&&\

\hline

\colorrow 0&&\

\hline

0&&\

\hline

\colorrow \textbf{Total}&123&\

\hline

\end{tabular}

Kỹ năng: Linux, Thiết lập Bản thảo, Quản trị hệ thống

Xem thêm: sed replace, sed, sed replace line, sed script, multi sed, sed delete line, sed multi replace, sed replace yes, sed multi, script replace, sed multi line, script replace sed, sed replace multi line, replace, line-following, awk, email support response, anonymous install, support line, system sed, yes response, replace file file, support script, multi file, multi user email system

Về Bên Thuê:
( 12 nhận xét ) Portland, United States

Mã Dự Án: #1045884

Đã trao cho:

slynux

Hey I have written the sed script for you. Please see the PM. If you need any improvements message me.

$30 USD trong 0 ngày
(4 Đánh Giá)
3.8

8 freelancer đang chào giá trung bình $32 cho công việc này

vili1977

I can help you.

$30 USD trong 1 ngày
(54 Đánh Giá)
5.0
srinichal

I can deliver this straight forward

$40 USD trong 1 ngày
(17 Đánh Giá)
5.0
ClusterStudio

Hello. I'm experienced linux administrator and will make this sed script in minutes. I am ready to begin as soon as you accept the project.

$30 USD trong 0 ngày
(26 Đánh Giá)
4.4
freelance4hire80

Hi, please check your PMB. Thanks

$35 USD trong 0 ngày
(7 Đánh Giá)
3.5
gyaseen

please check your PM Box

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0
ankel

Easy job for me. Please see PMB.

$30 USD trong 0 ngày
(0 Đánh Giá)
0.0
bojomojo

I can do this with PERL

$30 USD trong 1 ngày
(0 Đánh Giá)
0.0