![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| List certain file in a folder and make list | andrisetia | UNIX for Dummies Questions & Answers | 1 | 09-15-2008 02:21 PM |
| help with sorting sequence in Unix C:sort -t ':' +0 -1 -n +1 -2 +2 -3 -o list list | gurvinder | UNIX for Advanced & Expert Users | 6 | 08-27-2008 04:20 PM |
| counting a list of string in a list of txt files | Pep Puigvert | UNIX for Dummies Questions & Answers | 4 | 08-15-2008 04:55 PM |
| Drag and drop items in plain html page | matrixmadhan | UNIX for Dummies Questions & Answers | 1 | 08-08-2008 12:06 AM |
| send email from address list and subject list | paulds | UNIX for Dummies Questions & Answers | 2 | 06-27-2008 11:11 AM |
|
|
LinkBack | Thread Tools | Search this Thread |
Rating:
|
Display Modes |
|
||||
|
Plain Text List to HTML List
Hello, I am trying to take a simple list (from echo, not a file) and turn it into a list with HTML codes.
List item one. List item two. List item three. to <ol> <li>List item one.</li> <li>List item two.</li> <li>List item three.</li> </ol> The list is coming in via echo on standard input, and going to standard output. (I am using OnMyCommand so my plan is that all I have to do is select the list, and choose the right command and it's pasted in place. I have made some really simple commands in OMC for adding <b></b> tags around text, which is similar to this forums adding of tags. But trying to figure out sed and grep are too much for me for now. The main problem I've been having is trying to get the newlines in place, but for all intents and purposes, I'm back at square one, or should I say square zero. :-) ) I am not wed to any command line program, but it seems sed is the going to be best. Any help appreciated! (I've searched all over and can't seem to cobble this together. I'm on OS X 10.4 and I believe bash is the default shell.) |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|