06-30-2008
you can tackle this problem from the source if possible. Get whatever application that produce the csv to use a different delimiter instead. Save you the trouble.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm having a strange problem with escaping double-quotes. I have a script that looks like this:
#!/bin/bash
for HOST in `cat $INFILE | grep -v ^#`
do
for VFILER in `some_command`
do
echo " "
echo -e '\E
The problem with ssh command... (3 Replies)
Discussion started by: GKnight
3 Replies
2. Shell Programming and Scripting
Hi,
I have a requirement to replace the comma's inside the double quotes. The comma's inside the double quotes will get changed dynamically.
Input Record:
"Washington, DC,Prabhu,aju",New York
Output Record:
"Washington| DC|Prabhu|aju",New York
I tried with the below command but it... (3 Replies)
Discussion started by: prabhutkl
3 Replies
3. Shell Programming and Scripting
Hi, all
I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes.
sample input:
for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Discussion started by: kevintse
8 Replies
4. Shell Programming and Scripting
Hello,
I need to read a csv file and I am trying to replace a comma with a text DSEE?DSEE.
Example
Input
"Chapter","NewTrains, "oldTrains","Delayed",10,"London"
"Chapter","Newbuses,oldbuses","On Time",20,"London"
Output
"Chapter","NewTrainsDSEE?DSEE... (5 Replies)
Discussion started by: venkatvani
5 Replies
5. Shell Programming and Scripting
Hello there,
I have a comma separated csv , and all the text field is wrapped by double quote. Issue is some text field contain comma as well inside double quote. so it is difficult to process.
Input in the csv file is ,
1,234,"abc,12,gh","GH234TY",34
I need output like below,... (8 Replies)
Discussion started by: Uttam Maji
8 Replies
6. Shell Programming and Scripting
I am trying to re-format a .csv file using awk. I have 6 fields in the .csv file. Some of the fields are enclosed in double quotes and contain comma's inside the quotes. awk is breaking this into multiple fields.
Sample lines from the .csv file:
Device Name,Personnel,Date,Solution... (1 Reply)
Discussion started by: jxrst
1 Replies
7. Programming
Hi All,
I want to replace the commas which are not inside parenthesis,quotes
if input is
abc,,lm,(no,pq,rs),{tu,vw,xy},zs,"as,as,fr",'ab,cd,ef'
output should be
abc lm (no,pq,rs) {tu,vw,xy} zs "as,as,fr" 'ab,cd,ef'
I tried this str.replaceAll("\\(.*?\\)|(,)", " "); say my string... (3 Replies)
Discussion started by: preethy
3 Replies
8. Shell Programming and Scripting
Hi All,
I am getting .csv file whenever there is a comma present between a field that field get enclosed with double quotes
For eg as below
abc,123,xxyy,2178
fgh,123,"x,x"yy",2178
ghi,123,"x,xyy",2178
jkl,123,xx"yy,2178
whereas I want my data as per below
abc,123,xxyy,2178... (1 Reply)
Discussion started by: H_bansal
1 Replies
9. Shell Programming and Scripting
Hi,
00000119EEEC3F25 feedoor 20171103
0000011A4F152077 feedard 20171024
00000191FA295F61 feedzipperhola 20171023
00000213C57BB856 feedriodapple 20171005
0000025F778EF9D5 joobakoolrk 20171004
I needed the result as:
"00000119EEEC3F25", "feedoor", ... (9 Replies)
Discussion started by: ashokvpp
9 Replies
10. Shell Programming and Scripting
Hi Experts,
Please support
I have below data in file in comma seperated, but 4th column is containing comma in between numbers, bcz of which when i tried to parse the file the column 6th value(5049641141) is being removed from the file and value(222.82) in column 5 becoming value of column6.
... (3 Replies)
Discussion started by: as7951
3 Replies
LEARN ABOUT DEBIAN
gdal_retile
gdal_retile(1) General Commands Manual gdal_retile(1)
NAME
gdal_retile - gdal_retile.py gdal_retile.py retiles a set of tiles and/or build tiled pyramid levels
SYNOPSIS
gdal_retile.py [-v] [-co NAME=VALUE]* [-of out_format] [-ps pixelWidth pixelHeight]
[-ot {Byte/Int16/UInt16/UInt32/Int32/Float32/Float64/
CInt16/CInt32/CFloat32/CFloat64}]'
[ -tileIndex tileIndexName [-tileIndexField tileIndexFieldName]]
[ -csv fileName [-csvDelim delimiter]]
[-s_srs srs_def] [-pyramidOnly]
[-r {near/bilinear/cubic/cubicspline/lanczos}]
-levels numberoflevels
[-useDirForEachRow]
-targetDir TileDirectory input_files.fi
DESCRIPTION
This utility will retile a set of input tile(s). All the input tile(s) must be georeferenced in the same coordinate system and have a
matching number of bands. Optionally pyramid levels are generated. It is possible to generate shape file(s) for the tiled output.
If your number of input tiles exhausts the command line buffer, use the general --optfile option
-targetDir directory:
The directory where the tile result is created. Pyramids are stored in subdirs numbered from 1. Created tile names have a numbering
schema and contain the name of the source tiles(s)
-of format:
Output format, defaults to GeoTIFF (GTiff).
-co NAME=VALUE:
Creation option for output file. Multiple options can be specified.
-ot datatype:
Force the output image bands to have a specific type. Use type names (ie. Byte, Int16,...)
-ps pixelsize_x pixelsize_y:
Pixel size to be used for the output file. If not specified, 256 x 256 is the default
-levels numberOfLevels:
Number of pyramids levels to build.
-v:
Generate verbose output of tile operations as they are done.
-pyramidOnly:
No retiling, build only the pyramids
-r algorithm:
Resampling algorithm, default is near
-s_srs srs_def:
Source spatial reference to use. The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFro-
mUserInput() call, which includes EPSG PCS and GCSes (ie.EPSG:4296), PROJ.4 declarations (as above), or the name of a .prf file
containing well known text. If no srs_def is given, the srs_def of the source tiles is used (if there is any). The srs_def will be
propageted to created tiles (if possible) and to the optional shape file(s)
-tileIndex tileIndexName:
The name of shape file containing the result tile(s) index
-tileIndexField tileIndexFieldName:
The name of the attribute containing the tile name
-csv csvFileName:
The name of the csv file containing the tile(s) georeferencing information. The file contains 5 columns: tilename,minx,maxx,miny,maxy
-csvDelim column delimiter:
The column delimter used in the csv file, default value is a semicolon ';'
-useDirForEachRow:
Normally the tiles of the base image are stored as described in -targetDir. For large images, some file systems have performance
problems if the number of files in a directory is to big, causing gdal_retile not to finish in reasonable time. Using this parameter
creates a different output structure. The tiles of the base image are stored in a subdirectory called 0, the pyramids in subdirectories
numbered 1,2,.... Within each of these directories another level of subdirectories is created, numbered from 0...n, depending of how
many tile rows are needed for each level. Finally, a directory contains only the the tiles for one row for a specific level. For large
images a performance improvement of a factor N could be achieved.
NOTE: gdal_retile.py is a Python script, and will only work if GDAL was built with Python support.
AUTHORS
Christian Mueller christian.mueller@nvoe.at
GDAL
Tue Sep 18 2012 gdal_retile(1)