Sponsored Content
Top Forums Shell Programming and Scripting select a portion of a file into a CSV Post 302158297 by anju on Tuesday 15th of January 2008 02:11:17 AM
Old 01-15-2008
select a portion of a file into a CSV

How will i convert a file

<LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>
<LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>
<LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>
<LDATE>10-12-07</LDATE><LTIME>13:47:48.553</LTIME><LTEXT>name:anju;city:blore;ph:123</LTEXT>

to this
10-12-07,13:47:48.553,b'lore
10-12-07,13:47:48.553,b'lore
10-12-07,13:47:48.553,b'lore

Basically i want some portions of a file to be merged and form a new comma seperated file...
Please help this is urgent...Smilie

anju
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Select a portion of file based on query

Hi friends :) I am having a small problem and ur help is needed... I have a long file from which i want to select only some portions after filtering (grep). My file looks like : header xxyy lmno xxyy wxyz footer header abcd xy pqrs footer . . (14 Replies)
Discussion started by: vanand420
14 Replies

2. Shell Programming and Scripting

awk program to select a portion of a line

Hi all, I am new to awk programs.I have a file like this vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd vjfavhjlaf<LTEXT>aabcdfffvvbbxbcddjbv</LTEXT>fAFdfdADfd... (3 Replies)
Discussion started by: anju
3 Replies

3. Shell Programming and Scripting

select data from oracle table and save the output as csv file

Hi I need to execute a select statement in a solaris environment with oracle database. The select statement returns number of rows of data. I need the data to be inserted into a CSV file with proper format. For that we normally use "You have to select all your columns as one big string,... (2 Replies)
Discussion started by: rdhanek
2 Replies

4. Shell Programming and Scripting

Unix Scripting : Sort a Portion of a File and not the complete file

Need to sort a portion of a file in a Alphabetical Order. Example : The user adam is not sorted and the user should get sorted. I don't want the complete file to get sorted. Currently All_users.txt contains the following lines. ############## # ARS USERS ############## mike, Mike... (6 Replies)
Discussion started by: evrurs
6 Replies

5. UNIX for Dummies Questions & Answers

How to append portion of a file content to another file when a certain pattern is matching?

Hi ladies and gentleman.. I have two text file with me. I need to replace one of the file content to another file if one both files have a matching pattern. Example: text1.txt: ABCD 1234567,HELLO_WORLDA,HELLO_WORLDB DCBA 3456789,HELLO_WORLDE,HELLO_WORLDF text2.txt: XXXX,ABCD... (25 Replies)
Discussion started by: bananamen
25 Replies

6. Shell Programming and Scripting

Comparing Select Columns from two CSV files in UNIX and create a third file based on comparision

Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison. Thanks in advance for your help. File A A,B,C,45,46... (2 Replies)
Discussion started by: ady_koolz
2 Replies

7. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

8. Shell Programming and Scripting

Save output of updated csv file as csv file itself, part 2

Hi, I have another problem. I want to sort another csv file by the first field. result.csv SourceFile,Airspeed,GPSLatitude,GPSLongitude,Temperature,Pressure,Altitude,Roll,Pitch,Yaw /home/intannf/foto5/2015_0313_090651_219.JPG,0.,-7.77223,110.37310,30.75,996.46,148.75,180.94,182.00,63.92 ... (2 Replies)
Discussion started by: refrain
2 Replies

9. UNIX for Beginners Questions & Answers

Select and copy .csv files based on row and column number

Dear UNIX experts, I'm a command line novice working on a Macintosh computer (Bash shell) and have neither found advice that is pertinent to my problem on the internet nor in this forum. I have hundreds of .csv files in a directory. Now I would like to copy the subset of files that contains... (8 Replies)
Discussion started by: rcsapo
8 Replies
GENERATELORE(1) 														   GENERATELORE(1)

NAME
lore - convert documentations formats SYNOPSIS
lore [-l linkrel] [-d docsdir] [-i input] [-o output] [--config attribute[=value] [...]] [-p] [file [...]] lore --help DESCRIPTION
The --help prints out a usage message to standard output. -p, --plain Use non-flashy progress bar - one file per line. -n, --null Do not report progress at all. -N, --number Add chapter/section numbers to section headings. -l, --linkrel Where non-document links should be relative to. -d, --docsdir Where to look for .html files if no files are given. -e, --inputext <extension> The extension that your Lore input files have (default: .xhtml) -i, --input Input format. New input formats can be dynamically registered. Lore itself comes with "lore" (the standard format), "mlore" (allows LaTeX equations) and "man" (man page format). If the input format is not registered as a plugin, a module of the named input will be searched. For example, --i twisted.lore.default is equivalent to using the default Lore input. -o, --output Output format. Available output formats depend on the input. For the core formats, lore and mlore support html, latex and lint, while man allows lore. -x, --index <filename> The base filename you want to give your index file. -b, --book <filename> The book file to generate a book from. --prefixurl <prefix> The prefix to stick on to relative links; only useful when processing directories. --version Display version information and exit. --config Add input/output-specific information. HTML output allows for 'ext=<extension>', output allows for 'section' or 'chapter' in Lore, and nothing in Math-Lore. Lore output allows for 'ext=<extension>'. Lint output allows nothing. Note that disallowed --config options are merely ignored, and do not cause errors. DESCRIPTION
If no files are given, all *.html documents in docsdir are processed. AUTHOR
Written by Moshe Zadka REPORTING BUGS
To report a bug, visit http://twistedmatrix.com/bugs/ COPYRIGHT
Copyright (C) 2003-2008 Twisted Matrix Laboratories. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU- LAR PURPOSE. October 2002 GENERATELORE(1)
All times are GMT -4. The time now is 04:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy