Sponsored Content
Full Discussion: Output as a html file
Top Forums UNIX for Dummies Questions & Answers Output as a html file Post 302741479 by navsan on Sunday 9th of December 2012 01:48:09 AM
Old 12-09-2012
thanks a lot....i need to display like this if it is shutdown or unavailable


please check the below components
PRDU UCM Object code app UCM <b>Shutdown</b> Auto 0 20 1 1 2012-12-06 01:10:45

but wen i give like this

i getting mail full of "pls chk" along with output..

Code:
while read LINE
 do
 echo "pls chk below comp"
      echo $LINE | grep UCM | egrep '(Shutdown|Unavailable)'
 done <output.log

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

formatting output in html

hello all. I was hoping someone may have an idea or two. I'm throwing together a shell script that does a lot of application and system level data collection. The idea is is you run it before/after restarting an application for later analysis. A lot of stuff is collected... resource stats,... (4 Replies)
Discussion started by: ebbtide
4 Replies

2. UNIX for Dummies Questions & Answers

How do I extract text only from html file without HTML tag

I have a html file called myfile. If I simply put "cat myfile.html" in UNIX, it shows all the html tags like <a href=r/26><img src="http://www>. But I want to extract only text part. Same problem happens in "type" command in MS-DOS. I know you can do it by opening it in Internet Explorer,... (4 Replies)
Discussion started by: los111
4 Replies

3. Shell Programming and Scripting

awk script to search an html file and output links

hello. i want to make an awk script to search an html file and output all the links (e.g .html, .htm, .jpg, .doc, .pdf, etc..) inside it. also, i want the links that will be output to be split into 3 groups (separated by an empty line), the first group with links to other webpages (.html .htm etc),... (8 Replies)
Discussion started by: kyris
8 Replies

4. Shell Programming and Scripting

how to display the output file in an html format using perl

Hi, I have written a perl script to dispaly some statements from a file but i want the output statements to be dispalyed in an HTML format.Is it possible for me to do in perl scripting? Please help me with ur thoughts. Thanks In Advance Meva. (1 Reply)
Discussion started by: meva
1 Replies

5. Shell Programming and Scripting

Convert shell script output txt file to html table

Hi, I have script which generates the output as below: Jobname Date Time Status abc 12/9/11 17:00 Completed xyz 13/9/11 21:00 Running I have the output as a text file. I need to convert it into a HTML Table and sent it thru email ... (6 Replies)
Discussion started by: a12ka4
6 Replies

6. Shell Programming and Scripting

Removing all except couple of html tags from html file

I tried to find elegant (or at least simple) way to remove all but couple of html tags from html file, but all examples I found dealt with removing all the tags. The logic of the script would be: - if there is <li> or <ul> on the line, do nothing (=write same line to output) - if there is:... (0 Replies)
Discussion started by: juubuntu
0 Replies

7. Shell Programming and Scripting

Need to convert output.txt into html file

I have output.txt file generated through shell scripts which need convert in tabular format using html can you please help me output.txt Token State Date1 Date2 Description Name 34567 open 27/06/13 28/06/13 ... (5 Replies)
Discussion started by: vijay_rajni
5 Replies

8. UNIX for Dummies Questions & Answers

Help with redirecting output to an HTML file

I'm very new to shell scripting and am practicing how to write a script, then redirect the output into an HTML file, and then email both the script and the HTML file to myself. I have created a script called sysinfo_page, and thought it would have redirected the output into the sysinfo_page.html... (3 Replies)
Discussion started by: braing
3 Replies

9. Homework & Coursework Questions

Help with redirecting output to an HTML file

1. The problem statement, all variables and given/known data: I'm having trouble redirecting the output of my sysinfo_page script into my sysinfo_page.html file. The task at hand is to be able to email both the html file and the script to myself. I'm assuming that the html should appear as a web... (8 Replies)
Discussion started by: braing
8 Replies

10. Shell Programming and Scripting

Convert shell script output txt file to html table

My concnern related to the post -Convert shell script output txt file to html table, in this how to print the heading as color. awk 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print "</tr>"} END{print "</table>"}' <filename> (8 Replies)
Discussion started by: sarajobmai
8 Replies
ENC2XS(1)						 Perl Programmers Reference Guide						 ENC2XS(1)

NAME
enc2xs -- Perl Encode Module Generator SYNOPSIS
enc2xs -[options] enc2xs -M ModName mapfiles... enc2xs -C DESCRIPTION
enc2xs builds a Perl extension for use by Encode from either Unicode Character Mapping files (.ucm) or Tcl Encoding Files (.enc). Besides being used internally during the build process of the Encode module, you can use enc2xs to add your own encoding to perl. No knowledge of XS is necessary. Quick Guide If you want to know as little about Perl as possible but need to add a new encoding, just read this chapter and forget the rest. 0. Have a .ucm file ready. You can get it from somewhere or you can write your own from scratch or you can grab one from the Encode dis- tribution and customize it. For the UCM format, see the next Chapter. In the example below, I'll call my theoretical encoding myascii, defined in my.ucm. "$" is a shell prompt. $ ls -F my.ucm 1. Issue a command as follows; $ enc2xs -M My my.ucm generating Makefile.PL generating My.pm generating README generating Changes Now take a look at your current directory. It should look like this. $ ls -F Makefile.PL My.pm my.ucm t/ The following files were created. Makefile.PL - MakeMaker script My.pm - Encode submodule t/My.t - test file 1.1. If you want *.ucm installed together with the modules, do as follows; $ mkdir Encode $ mv *.ucm Encode $ enc2xs -M My Encode/*ucm 2. Edit the files generated. You don't have to if you have no time AND no intention to give it to someone else. But it is a good idea to edit the pod and to add more tests. 3. Now issue a command all Perl Mongers love: $ perl Makefile.PL Writing Makefile for Encode::My 4. Now all you have to do is make. $ make cp My.pm blib/lib/Encode/My.pm /usr/local/bin/perl /usr/local/bin/enc2xs -Q -O -o encode_t.c -f encode_t.fnm Reading myascii (myascii) Writing compiled form 128 bytes in string tables 384 bytes (25%) saved spotting duplicates 1 bytes (99.2%) saved using substrings .... chmod 644 blib/arch/auto/Encode/My/My.bs $ The time it takes varies depending on how fast your machine is and how large your encoding is. Unless you are working on something big like euc-tw, it won't take too long. 5. You can "make install" already but you should test first. $ make test PERL_DL_NONLAZY=1 /usr/local/bin/perl -Iblib/arch -Iblib/lib -e 'use Test::Harness qw(&runtests $verbose); $verbose=0; runtests @ARGV;' t/*.t t/My....ok All tests successful. Files=1, Tests=2, 0 wallclock secs ( 0.09 cusr + 0.01 csys = 0.09 CPU) 6. If you are content with the test result, just "make install" 7. If you want to add your encoding to Encode's demand-loading list (so you don't have to "use Encode::YourEncoding"), run enc2xs -C to update Encode::ConfigLocal, a module that controls local settings. After that, "use Encode;" is enough to load your encodings on demand. The Unicode Character Map Encode uses the Unicode Character Map (UCM) format for source character mappings. This format is used by IBM's ICU package and was adopted by Nick Ing-Simmons for use with the Encode module. Since UCM is more flexible than Tcl's Encoding Map and far more user-friendly, this is the recommended formet for Encode now. A UCM file looks like this. # # Comments # <code_set_name> "US-ascii" # Required <code_set_alias> "ascii" # Optional <mb_cur_min> 1 # Required; usually 1 <mb_cur_max> 1 # Max. # of bytes/char <subchar> x3F # Substitution char # CHARMAP <U0000> x00 |0 # <control> <U0001> x01 |0 # <control> <U0002> x02 |0 # <control> .... <U007C> x7C |0 # VERTICAL LINE <U007D> x7D |0 # RIGHT CURLY BRACKET <U007E> x7E |0 # TILDE <U007F> x7F |0 # <control> END CHARMAP o Anything that follows "#" is treated as a comment. o The header section continues until a line containing the word CHARMAP. This section has a form of <keyword> value, one pair per line. Strings used as values must be quoted. Barewords are treated as numbers. xXX represents a byte. Most of the keywords are self-explanatory. subchar means substitution character, not subcharacter. When you decode a Unicode sequence to this encoding but no matching character is found, the byte sequence defined here will be used. For most cases, the value here is x3F; in ASCII, this is a question mark. o CHARMAP starts the character map section. Each line has a form as follows: <UXXXX> xXX.. |0 # comment ^ ^ ^ | | +- Fallback flag | +-------- Encoded byte sequence +-------------- Unicode Character ID in hex The format is roughly the same as a header section except for the fallback flag: | followed by 0..3. The meaning of the possible val- ues is as follows: |0 Round trip safe. A character decoded to Unicode encodes back to the same byte sequence. Most characters have this flag. |1 Fallback for unicode -> encoding. When seen, enc2xs adds this character for the encode map only. |2 Skip sub-char mapping should there be no code point. |3 Fallback for encoding -> unicode. When seen, enc2xs adds this character for the decode map only. o And finally, END OF CHARMAP ends the section. When you are manually creating a UCM file, you should copy ascii.ucm or an existing encoding which is close to yours, rather than write your own from scratch. When you do so, make sure you leave at least U0000 to U0020 as is, unless your environment is EBCDIC. CAVEAT: not all features in UCM are implemented. For example, icu:state is not used. Because of that, you need to write a perl module if you want to support algorithmical encodings, notably the ISO-2022 series. Such modules include Encode::JP::2022_JP, Encode::KR::2022_KR, and Encode::TW::HZ. Coping with duplicate mappings When you create a map, you SHOULD make your mappings round-trip safe. That is, "encode('your-encoding', decode('your-encoding', $data)) eq $data" stands for all characters that are marked as "|0". Here is how to make sure: o Sort your map in Unicode order. o When you have a duplicate entry, mark either one with '|1' or '|3'. o And make sure the '|1' or '|3' entry FOLLOWS the '|0' entry. Here is an example from big5-eten. <U2550> xF9xF9 |0 <U2550> xA2xA4 |3 Internally Encoding -> Unicode and Unicode -> Encoding Map looks like this; E to U U to E -------------------------------------- xF9xF9 => U2550 U2550 => xF9xF9 xA2xA4 => U2550 So it is round-trip safe for xF9xF9. But if the line above is upside down, here is what happens. E to U U to E -------------------------------------- xA2xA4 => U2550 U2550 => xF9xF9 (xF9xF9 => U2550 is now overwritten!) The Encode package comes with ucmlint, a crude but sufficient utility to check the integrity of a UCM file. Check under the Encode/bin directory for this. Bookmarks o ICU Home Page <http://oss.software.ibm.com/icu/> o ICU Character Mapping Tables <http://oss.software.ibm.com/icu/charset/> o ICU:Conversion Data <http://oss.software.ibm.com/icu/userguide/conversion-data.html> SEE ALSO
Encode, perlmod, perlpod perl v5.8.0 2003-02-18 ENC2XS(1)
All times are GMT -4. The time now is 08:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy