Sponsored Content
Top Forums Shell Programming and Scripting Convert comma text file to Column in html format Post 302302216 by joeyg on Monday 30th of March 2009 11:29:03 AM
Old 03-30-2009
Question Is this what you are trying to do?

Code:
> inv="EQADM,edrtere9-phys,8122caef0,gpatmon,/bin/ksh,nuten Erick"
> echo $inv | awk -F"," '{printf("%15s%15s%15s%15s%15s%15s\n",$1,$2,$3,$4,$5,$6)}'
          EQADM  edrtere9-phys      8122caef0        gpatmon       /bin/ksh    nuten Erick

or
Code:
> echo $inv | awk -F"," '{printf("%-15s%-15s%-15s%-15s%-15s%-15s\n",$1,$2,$3,$4,$5,$6)}'
EQADM          edrtere9-phys  8122caef0      gpatmon        /bin/ksh       nuten Erick

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to convert this file into comma delimited format

Hi experts, I need urget help! I have the a text file with this format: Types of fruits Name of fruits 1,1 Farm_no,1 apple,1 pineapple,1 grapes,1 orange,1 banana,1 2,2--->this is the record seperator Farm_no,2 apple,1 pineapple,1 grapes,3 orange,2 banana,1 3,3--->this is the... (1 Reply)
Discussion started by: natalie23
1 Replies

2. UNIX for Advanced & Expert Users

Urgent! need help! how to convert this file into comma delimited format

Hi experts, I need urget help! I have the a text file with this format: Types of fruits Name of fruits 1,1 Farm_no,1 apple,1 pineapple,1 grapes,1 orange,1 banana,1 2,2--->this is the record seperator Farm_no,2 apple,1 pineapple,1 grapes,3 orange,2 banana,1 3,3--->this is the... (2 Replies)
Discussion started by: natalie23
2 Replies

3. Shell Programming and Scripting

Is it possible to convert text file to html table using perl

Hi, I have a text file say file1 having data like ABC c:/hm/new1 Dir DEF d:/ner/d sd ...... So i want to make a table from this text file, is it possible to do it using perl. Thanks in advance Sarbjit (1 Reply)
Discussion started by: sarbjit
1 Replies

4. Shell Programming and Scripting

How to format file into comma separated text file?

Hi Guys, I have text file which is tab/space separated but I want it to re-format into a comma separated and trim the spaces in between. Can someone spare me a perl or sed script that can do the job? INPUT FILE: 500010245623 500 21-APR-11 05.58.21 PM ... (14 Replies)
Discussion started by: pinpe
14 Replies

5. UNIX for Dummies Questions & Answers

How to convert a text file into tab delimited format?

I have a text file that made using text editor in Ubuntu. However the text file is not being recognized as space or tab delimited, the formatting seems to be messed up. How can I convert the text file into tab delimited format? (3 Replies)
Discussion started by: evelibertine
3 Replies

6. Shell Programming and Scripting

Convert the date format from mdy to ymd in column of file

The date format in the delimited file for one column '6/27/2011 12:00:00 AM' Is it possible o change it to '2011-06-27 12:00:00 AM' for all the records.. Thanks in advance..... (8 Replies)
Discussion started by: infernalhell
8 Replies

7. Shell Programming and Scripting

Convert text file to HTML tabular format.

Please provide script/commands to convert text file to HTML tabular format. No need of styles and colours, just output and a heading in table is required. Output file will be send via email and will be seen from outlook. (script required without using awk). output file content: (sar... (7 Replies)
Discussion started by: Veera_V
7 Replies

8. Shell Programming and Scripting

Format text file to html

Hi Experts, Anybody out there figure out on how to achieve in shell scripts or tools. I have done googling to find solutions but no luck. I have thousands of .txt files to batch process, please see the below sample text content after -------- start here --------. What I want to achieve is to... (10 Replies)
Discussion started by: lxdorney
10 Replies

9. Shell Programming and Scripting

Loop to convert text output in the HTML format

Hello Everyone, I have a sample file raw.txt as shown below : Drive Bays Bay Name : SD-2C Number of Standby Power Supplies : 4 Number of Drive Enclosures : 12 Summary Status of Contained Modules All... (6 Replies)
Discussion started by: rahul2662
6 Replies

10. Shell Programming and Scripting

Convert listner.log to csv format with comma seperated

Hi All, I am new to shell scripting i am trying to convert the listner.log to csv which can be inturn converted to excel for easy reading. i used this command awk '/SID=/ && /HOST=/ && /PORT=/ && /USER=/ { i=match($0,"SID="); i=i+RLENGTH; h0=substr($0,i); i=match(h0,")");... (6 Replies)
Discussion started by: skoshekay
6 Replies
commandlog(4)						     Sun Cluster File Formats						     commandlog(4)

NAME
commandlog - command log file SYNOPSIS
/var/cluster/logs/commandlog DESCRIPTION
The commandlog ASCII text file contains records of selected Sun Cluster commands that are executed in a cluster. The logging of commands starts automatically when you set up the cluster and ends when you shut down the cluster. Commands that are not logged in this file include those that display the configuration and current state of the cluster. Commands that are logged in this file include those that configure and change the current state of the cluster, as follows: o claccess o cldevice o cldevicegroup o clinterconnect o clnasdevice o clnode o clquorum o clreslogicalhostname o clresource o clresourcegroup o clresourcetype o clressharedaddress o clsnmphost o clsnmpmib o clsnmpuser o cltelemetryattribute o cluster o scconf o scdidadm o scdpm o scgdevs o scrgadm o scshutdown o scswitch Each record in the commandlog file contains the following information: o Date and timestamp o Host name from the which the command was executed o Process ID of the command o ID of the user who executed the command o Command that the user executed, including all options and operands Note - Command options are quoted in the commandlog file to enable you to copy, paste, and execute them in the shell. o Exit status or signal of the executed command By default, the commandlog file is regularly archived at the end of every week. Sun Cluster maintains up to eight previously archived com- mandlog files on each cluster node at any given time. EXAMPLES
Example 1 /var/cluster/logs/commandlog File The following example shows the contents of a typical /var/cluster/logs/commandlog file: 11/11/2006 09:43:36 phys-schost-1 5758 root START - clrg add "app-sa-1" 11/11/2006 09:43:36 phys-schost-1 5758 root END 0 11/11/2006 09:43:36 phys-schost-1 5760 root START - clrg set -y "RG_description=Department Shared Address RG" "app-sa-1" 11/11/2006 09:43:37 phys-schost-1 5760 root END 0 11/11/2006 09:44:15 phys-schost-1 5810 root START - clrg online "app-sa-1" 11/11/2006 09:44:15 phys-schost-1 5810 root END 0 11/11/2006 09:44:19 phys-schost-1 5222 root END -20988320 12/02/2006 14:37:21 phys-schost-1 5542 jbloggs START - clrg -c -g "app-sa-1" -y "RG_description=Joe Bloggs Shared Address RG" 12/02/2006 14:37:22 phys-schost-1 5542 jbloggs END 0 ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsczu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
scha_control(1HA), scha_resource_setstatus(1HA), scconf(1M), scdidadm(1M), scdpm(1M), scgdevs(1M), scrgadm(1M), scshutdown(1M), scswitch(1M), attributes(5) Sun Cluster 3.2 18 Jul 2006 commandlog(4)
All times are GMT -4. The time now is 02:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy