Sponsored Content
Top Forums Shell Programming and Scripting Need script to convert TXT file into CSV Post 302942178 by RudiC on Saturday 25th of April 2015 06:29:32 AM
Old 04-25-2015
Try also
Code:
awk '{gsub(/\(|\)|\[|\]|NOD_/,_); print $2, $3, $6}' file
U-UU-LVDT-NOD-6002 4406 1234:333:aaa:2333:3:2:333:a
U-UU-LVDT-NOD-6004 3805 1234:333:aaa:2333:3:2:333:e
U-UU-LVDT-NOD-6005 4288 1234:333:aaa:1400:3:2:333:1e
U-UU-LVDT-NOD-6006 2810 1234:333:aaa:a00:3:2:333:7a
U-UU-LVDT-NOD-6008 2803 1234:333:aaa:a00:3:2:333:66
U-UU-LVDT-NOD-9006 2320 1234:333:aaa:1400:3:2:333:22
U-UU-LVDT-NOD-9014 2095 1234:333:aaa:a00:3:2:333:d6

This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to convert XLS to CSV and DOC/RTF to TXT

Hi, i don't know anything about PERL. Can anyone help me providing PERL scripts for 1. converting XLS to CSV (and vice-versa) 2. converting DOC/RTF to TXT Thanks much Prvn (1 Reply)
Discussion started by: prvnrk
1 Replies

2. Shell Programming and Scripting

Txt to csv convert

Hi, I was trying some split command to pull out values like "uid=abc,ou=INTERNAL,ou=PEOPLE" into a csv file. However because of erratic nature of occurrance of rows made me stopped. Could someone help me in this? and if someone has a one liner for this? The text file contain pattern like this... (14 Replies)
Discussion started by: john_prince
14 Replies

3. Shell Programming and Scripting

Is there any script which convert binary file to CSV format

Dear guys; I have a binary file and I need to convert its data to csv format ...appreciating your help. Best Regards (14 Replies)
Discussion started by: ahmad.diab
14 Replies

4. Programming

awk script to convert a text file into csv format

hi...... thanks for allowing me to start a discussion i am collecting usb usage details of all users and convert it into csv files so that i can export it into some database.. the input text file is as follows:- USB History Dump by nabiy (c)2008 (1) --- Kingston DataTraveler 130 USB... (2 Replies)
Discussion started by: certteam
2 Replies

5. Shell Programming and Scripting

Convert txt to csv

Hi - I am looking to convert the following text to csv. The columns may not always have data in them and they may have varying spaces but I still need to have a comma there anyway: Sample Data: ~~~~~~~ Name Email Location Phone Tom... (4 Replies)
Discussion started by: JPBovaird
4 Replies

6. 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

7. UNIX for Dummies Questions & Answers

Help with a project. convert a txt to csv

Hi people. I've finally converted to linux, and I'm starting to explore the amazing capabilities of the terminal. At the moment in trying to learn how to extract text using the "grep" and "sed" command. I decided to learn by trying to figure out how to solve a practical problem. I have a schedule... (4 Replies)
Discussion started by: kugalskaper
4 Replies

8. Shell Programming and Scripting

Script to convert CSV file to HTML

Hi, I have made a a script which creates a csv file as daily database report However i want to covert that csv file to html because csv file does not have a good visibilty. So it is possible to have such csv to html coversion script. Your prompt help much appreciated. Thanks in advance (4 Replies)
Discussion started by: sv0081493
4 Replies

9. 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

10. UNIX for Beginners Questions & Answers

Convert a txt file to a CSV file

Hi , I have a Txt file which consist of 1000's of SOAP request and response and i want the file to be converted to a csv file like column a should have a soap request and column b should have the soap response . can someone assist me in achieving this please ? Thanks (2 Replies)
Discussion started by: kumarm8
2 Replies
foo2hiperc-wrapper(1)					      General Commands Manual					     foo2hiperc-wrapper(1)

NAME
foo2hiperc-wrapper - Convert Postscript into a HIPERC printer stream SYNOPSIS
foo2hiperc-wrapper [options] [ps-file] DESCRIPTION
foo2hiperc-wrapper is a Foomatic compatible printer wrapper for the foo2hiperc printer driver. This script reads a Postscript ps-file or standard input and converts it to the Oki HIPERC printer format for driving the Oki C310dn, C3100, C3200, C3300n, C3400n, C5100n, C5500n, C5600n and the C5800n HIPERC printers. This script can be used in a standalone fashion, but is intended to be called from a printer spooler system which uses the Foomatic printer database. COMMAND LINE OPTIONS
Normal Options These are the options used to select the parameters of a print job that are usually controlled on a per job basis. -c Print in color (else monochrome). -C colormode Color correction mode [0]. 10 ICM color profile (using -G *.icm file) -d duplex Duplex code to send to printer [1]. | | | |1 off | 2 long edge | 3 short edge -m media Media code to send to printer [0]. -------------------------- Media HIPERC -------------------------- plain 0 labels 1 transparency 2 -p paper Paper size code to send to printer [2]. +-------------+------------------+ | 1 A4 | 2 letter | | 3 legal | - - | | 5 A5 | 6 B5jis | | 7 A6 | 8 env Monarch | | 9 env DL | 10 env C5 | |11 env #10 | 12 executive | |13 env #9 | - - | +-------------+------------------+ -n copies Number of copies [1]. -r xresxyres Set device resolution in pixels/inch [600x600]. -s source Source (Input Slot) code to send to printer [0]. |0 auto select | |1 tray1 | 2 tray2 |3 multi | 4 manual -t Draft mode. Every other pixel is white. -2 -3 -4 -5 -6 -8 -9 -10 -12 -14 -15 -16 -18 Print in N-up. Requires the psutils package. -o orient Orientation used for N-up. Portrait -op (normal) Landscape -ol (rotated 90 degrees anticlockwise) Seascape -os (rotated 90 degrees clockwise) Printer Tweaking Options These are the options used to customize the operation of foo2hiperc for a particular printer. -u xoffxyoff Set the offset of the start of the printable region from the upper left corner, in pixels [varies with paper size]. -l xoffxyoff Set the offset of the end of the printable region from the lower right corner, in pixels [varies with paper size]. -L mask Send the logical clipping values from -u/-l in the HIPERC stream. foo2hiperc-wrapper always runs Ghostscript with the ideal page dimensions, so that the scale of the image is correct, regardless whether or not the printer has unprintable regions. This option is used to move the position of the clipped image back to where it belongs on the page. The default is to send the amount which was clipped by -u and -l, and should be good in most cases. 0 don't send any logical clipping amounts 1 only send Y clipping amount 2 only send X clipping amount 3 send both X and Y clipping amounts -Z compressed Use uncompressed (0) or compressed (1) JBIG data. Color Tweaking Options These are the options used to control the quality of color output. Color correction is currently a WORK IN PROGRESS. -g gsopts Additional options to pass to Ghostscript, such as -g"-dDITHERPPI=nnn", etc. This option may appear more than once. -G profile.icm Convert profile.icm to a Postscript color rendering dictionary (CRD) using foo2zjs-icc2ps and adjust the printer colors by using the Postscript setcolorrendering operator. (WORK IN PROGRESS). -G gamma-file.ps Prepend gamma-file.ps to the Postscript input to perform color correction using the setcolortransfer Postscript operator. For exam- ple, the file might contain: {0.333 exp} {0.333 exp} {0.333 exp} {0.333 exp} setcolortransfer -I intent Select profile intent from the ICM file. 0=Perceptual, 1=Colorimetric, 2=Saturation, 3=Absolute. Default is 0 (perceptual). Debugging Options These options are used for debugging foo2hiperc and its wrapper. -S plane Output just a single color plane from a color print and print it on the black plane. The default is to output all color planes. 1 Cyan 2 Magenta 3 Yellow 4 Black -D level Set Debug level [0]. EXAMPLES
Create a monochrome HIPERC stream from a Postscript document, examine it, and then print it using nc(1) or netcat(1): foo2hiperc-wrapper testpage.ps > testpage.hc hipercdecode < testpage.hc nc 192.168.1.NNN 9100 < testpage.hc Create a color HIPERC stream from a Postscript document: foo2hiperc-wrapper -c testpage.ps > testpage.hc FILES
/usr/bin/foo2hiperc-wrapper SEE ALSO
foo2hiperc(1), hipercdecode(1) AUTHOR
Rick Richardson <rick.richardson@comcast.net> http://foo2hiperc.rkkda.com/
All times are GMT -4. The time now is 04:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy