Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Converting another line to another format

$
0
0
Hi there,

How can i shorten this:

Code:

grep -ri "Password must meet complexity requirements" "$line" | sed  's/\t/<\/td><td>/' | sed 's/^.*:/<tr><td>/'| sed  's/$/<\/td><\/tr>/'
I am looking for a shorter alternative of sed. What I was trying to do is to change the string output format from

Code:

LPO/ULT0151_Password Policy.txt-Password must meet complexity requirements  Enabled
to:
Code:

<tr><td>Password must meet complexity requirements</td><td>Enabled</td></tr>
Moderator's Comments:
Please use CODE tags for all sample input, sample output, AND code segments.

Viewing all articles
Browse latest Browse all 16232

Trending Articles