01-24-2011
@rdcwayx: only when there are 5 fields...
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Newbie here. Need to convert a txt file to .csv format. There's no character to replace so not sure if I can use sed :confused: . The comma is to be inserted after every certain number of characters in each line...
Help!
Thanks. (4 Replies)
Discussion started by: mbelen
4 Replies
2. UNIX for Dummies Questions & Answers
I have a list of files with names as "FULL_abcd_xyz_timestamp.txt" and "FULL_xx_abcd_xyz_timestamp.txt". I am writing a script with a 'for loop' to take each file, strip the "FULL" and "timestamp" from the file name and do some actions on the contains of the file. So I need to know the number of... (4 Replies)
Discussion started by: ayanbiswas
4 Replies
3. Shell Programming and Scripting
Hi all,
I have a pipe delimited file - (sample data)
1|1|K|Doe|1234567890|123456789|EXP|99|99|John|Y|Dallas|Texas|Kyle|999
2|1|A|2|01/01/9999|Appl|01/01/9999|vendor|Select||||||
3|1|A|2|01/01/9999|Check|01/01/9999|ksmith|Suggest||||||
4|1|T|Complaint|Mary|01/01/9999|01/01/9999|||||||... (2 Replies)
Discussion started by: sumeet
2 Replies
4. Shell Programming and Scripting
Hi All
I have recently had to start using Unix for work and I have hit brick wall with this prob....
I have a file that goes a little something like this....
EUR;EUR;EUR:USD:USD;USD;;;EUR/USD;XAU/AUD;XAU/EUR;XAU/AUD,GBP/BOB,UAD/XAU;;;1.11;2.22;3.33;4.44;5.55;6.66;;;
is it possible to... (7 Replies)
Discussion started by: luckycharm
7 Replies
5. UNIX and Linux Applications
Hi,
Pls check that '|' and '+' present in Step-1 are not copied to log file in Step-3.
Pls suggest how to get the exact output from Step-1 (i.e. with out losing '|' and '+') in to a log file
~Thanks
Step-1: Execute command
> mysql -utest -ptest -htesthost testdb -e "select * from... (3 Replies)
Discussion started by: newbielgn
3 Replies
6. Shell Programming and Scripting
Good afternoon!
I have an XML file from which I want to extract only certain elements contained within each line. The problem is that the format of each line is not exactly the same (though similiar). For example, oa_var will be in each line, however, there may be no value or other... (3 Replies)
Discussion started by: bab@faa
3 Replies
7. Shell Programming and Scripting
Hi ,
i have a text file in which i want to put delimiters after certain characters ( fix),.
like put a delimiter (any like ,) after 1-3 character than 4 than 5 than 6-17 .....
files looks like this (original)... (8 Replies)
Discussion started by: anamdev
8 Replies
8. Shell Programming and Scripting
Having a huge file in the following format.
2,3,1,,,4
1,2,3,,,,,5,
8,7,3,4,,,,
Output needed is:
2,3,1,0.0,0.0,4
1,2,3,0.0,0.0,0.0,0.0,5,
8,7,3,4,0.0,0.0,0.0,
I have tried reading the file each line, using AWK to parse to find out ",," and then insert 0.0 . It works but very slow. Need... (8 Replies)
Discussion started by: wincrazy
8 Replies
9. Shell Programming and Scripting
I have a pipe delimited file and I'm trying to write a script that will give the character/byte positions of each pipe in the file. There may be some simple way but I don't know what it is... Can someone help with this?
Ex: file has output below
abc|def|ghi|
I want the script to tell the... (1 Reply)
Discussion started by: basz808
1 Replies
10. Shell Programming and Scripting
Hi All,
I have a file with a single row having the following text
ABC.ABC.ABC,Database,New123,DBNAME,F,ABC.ABC.ABC_APP,"@FUNCTION1("ENT1") ,@FUNCTION2("ENT2")",R,
I want an output in the following format
ABC.ABC.ABC DBNAME ABC.ABC.ABC_APP '@FUNCTION1("ENT1")... (3 Replies)
Discussion started by: dev.devil.1983
3 Replies
LEARN ABOUT DEBIAN
maptool
maptool(1) USER COMMANDS maptool(1)
NAME
maptool - parse osm textfile and convert to Navit binfile format
SYNOPSIS
For OSM XML data: bzcat planet.osm.bz2 | maptool mymap.bin [-h] [-2] [-5 <file>] [-6] [-a <level>] [-c] -[-d <connect string] [-e <phase>]
[-i <file>] [-k] [-M] [-N] [-o] [-r <file>] [-s <phase>] [-S <size>] [-w] [-W] [-U] [-z <level>] For OSM Protobuf/PBF data: maptool --pro-
tobuf -i planet.osm.pbf planet.bin [-h] [-2] [-5 <file>] [-6] [-a <level>] [-c] [-e <phase>] [-i <file>] [-k] [-M] [-N] [-o] [-P] [-r
<file>] [-s <phase>] [-S <size>] [-w] [-W] [-U] [-z <level>]
DESCRIPTION
maptool parses osm textfile and converts it to Navit binfile format
OPTIONS
-h (--help)
display a short help message
-2 (--dowai2poi)
convert ways and polygons to POIs when applicable
-4 (--md5)
set file where to write md5 sum
-6 (--64bit)
set zip 64 bit compression
-a (--attr-debug-level) <level>
control which data is included in the debug attribute
-c (--dump-coordinates)
dump coordinates after phase 1
-d (--db) <connect string>
get osm data out of a postgresql database with osm simple scheme and given connect string
-e (--end) <phase>
end at specified phase
-i (--input-file) <file>
specify the input file name (OSM), overrules default stdin
-k (--keep-tmpfiles)
do not delete tmp files after processing. useful to reuse them
-N (--nodes-only)
process only nodes
-o (--coverage)
converts every street to street_converage, resulting in a big fat black line. You can overlay this map with another vector map or
image map, and every street you will still see is missing in the -o map
-P (--protobuf)
input file is protobuf
-r (--rule-file) <file>
read mapping rules from specified file
-s (--start) <phase>
start at specified phase
-S (--slice-size) <phrase>
defines the amount of memory to use, in bytes. Default is 1GB
-w (--dedupe-ways)
ensure no duplicate ways or nodes. useful when using several input files
-W (--ways-only)
process only ways
-U (--unknown-country)
add objects with unknown country to index
-z (--compression-level) <level>
set the compression level
BUGS
Should you find one, please report it :
http://trac.navit-project.org
AUTHOR
The navit Team - http://www.navit-project.org
SEE ALSO
navit(1)
$Revision$ $Date$ maptool(1)