Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Your question seems to have two components that are distinct different and separate. The first seems to be that of reformatting the data into something that can be somehow published. The second seems to be related to the actual publishing/distributing of the data. The wording of your question seems to indicate that you aren't clear how the two are distinct.
The first part is probably best accomplished with some kind of script that massages text data into some desired format. The desired format really depends on how the data will be viewed. Commonly these days, it may be viewed with a web browser. Other formats may be things like word processor formatting, PDF or PS, latex, some kind of image format, etc. Each of these formats has some attribute that may make them suitable for one purpose or another, and each will require some different tool in order to view or edit them. Accordingly, they may require some particular tool to transform what you have into each particular format.
The second part of your objective seems revolve around how the data is to be published. Simply placing the data on some kind of shared filesystem may be adequate. Web servers (HTTP servers) are clearly well known and widely used these days. Using HTML generally implies the use of a web server (although HTML data may be read from filesystem files). Scripts can crafted to send documents of any format by e-mail. Other methods may available to you. You may need to consult someone with local expertise in the matter of setting this kind of thing up.
I seems you should do a little re-thinking about what you really want, post your ideas here, and someone can help provide more concise information.
We cannot drop any file into production environment. It needs to be tested before going into any live environment . I believe there must be some quick and easy way with help of awk and sed? I have done with uuencode it just garbages the log file.
You do realise that the Perl lang is part of the std install on Linux.
You could write your own code with it.
This kind of data munging is one of the things its good at.
For a job like this I'd definitely use it rather than awk & have done.
Perhaps provide a sample of your raw data (and absolutely do post it in [CODE] [/CODE] tags to preserve existing format), and someone can provide a basic script to transform it.
Your description of the output as a 'table' is really meaningless without knowing what application or class of application will render it. You originally said you wanted it to be in HTML, but now you say you don't want a web page; two completely contradictory requirements. If you want it to be rendered with something more complex than a web browser, then transforming the data using primitive tools such as Bash will probably not be practical. If you just want the data to be formatted/structured as plain ASCII text, then Bash is probably very much up to the task. Since part of the problem is to do it with tools already available to you, it would be helpful if you could enumerate what is available. To anyone replying on this list, Perl would certainly fall in the category of tools normally installed in Linux. If that isn't available, then the list must be quite short indeed.
A key question is exactly how you expect the recipient to view this 'table'
There are at least 3 options:
1. html - suitable for a browser to view or to be put on a webpage
2. flat text 'looks like' a table - email, any basic editor
3. csv file - suitable to be imported into a spreadsheet tool eg Excel, which will display it as a 'table'