Sponsored Content
Top Forums Shell Programming and Scripting Reducing the decimal points of numbers (3d coordinates) in a file; how to input data to e.g. Python Post 302896101 by bartus11 on Friday 4th of April 2014 11:19:59 AM
Old 04-04-2014
Try:
Code:
awk '{for (i=1;i<=NF;i++) $i=sprintf ("%.2f",$i)}1' file

This User Gave Thanks to bartus11 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

searching for decimal numbers in a file

hi all, was wanting to know how to search for decimal numbers in a file ? am using solaris 8 and have tried a few options with "grep" but none of them seem to work. thanks in advance. (1 Reply)
Discussion started by: cesarNZ
1 Replies

2. UNIX for Dummies Questions & Answers

How to get data only inside polygon created by points which is part of whole data from file?

hiii, Help me out..i have a huge set of data stored in a file.This file has has 2 columns which is latitude & longitude of a region. Now i have a program which asks for the number of points & based on this number it asks the user to enter that latitude & longitude values which are in the same... (7 Replies)
Discussion started by: reva
7 Replies

3. Shell Programming and Scripting

Pulling data by GPS coordinates from text file

Hi there, I'm having a problem trying to extract data from within a text file. I'm trying to extract this manually for a lack of better words. I need any items that fall within latitude 36.5 to 39.5 and long -75.3 to -83.9 I have been doing this using cat neta.txt | grep '!38' and working... (6 Replies)
Discussion started by: Mikey
6 Replies

4. Shell Programming and Scripting

Determination n points between two coordinates

Hi guys. Can anyone tell me how to determine points between two coardinates. For example: Which type of command line gives me 50 points between (8, -5, 7) and (2, 6, 9) points Thanks (5 Replies)
Discussion started by: rpf
5 Replies

5. Programming

PL/SQL Determine if the coordinates of a point is within four points

Dear all, Given that the coordinates of 4 points such as c1(x1,y1), c2(x2,y2), c3(x3,y3), c4(x4,y4). Does any body know how to use plain sql / plsql to determine coordinates of a point e.g. (x,y) is within 4 points above efficiently. The 4 points supposedly form a rectangle rectangular. ... (0 Replies)
Discussion started by: eldonlck
0 Replies

6. UNIX for Dummies Questions & Answers

Help with decimal points

Hi All, I would like to set decimal point to 16 in the following bash script but it has syntax error at }: awk '{printf"%.16e", (a<500,a++,$1/(a*1.1212121212121229e-02))}' input.dat >output.datHow may I set it in the correct way please? Thank you very much! (6 Replies)
Discussion started by: sxiong
6 Replies

7. UNIX for Beginners Questions & Answers

Reducing input file size after pattern search

I have a very large file with millions of entries identified by @M. I am using the following script to "extract" entries based on specific strings/patterns: #!/bin/bash if ] then file=$1 else echo "Input_file passed as an argument $1 is NOT found." exit; fi MID=(NULL "string-1"... (10 Replies)
Discussion started by: Xterra
10 Replies

8. Homework & Coursework Questions

Grep commands for numbers w/decimal points

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Is there a grep commands for numbers w/decimal points Display lines for students with GPA above 3.69 but less... (3 Replies)
Discussion started by: jetoutant
3 Replies

9. Shell Programming and Scripting

Add coordinates to line of output extracted from input file

I am trying to compare/confirm the output of an script using the perl below, which does execute. However I can not seem to print $1 and $2 in each line of the input separated by a tab in each line of the output. The input file is quite large so I have only included a portion, but the format is the... (0 Replies)
Discussion started by: cmccabe
0 Replies

10. UNIX for Beginners Questions & Answers

Read a file with decimal numbers in bash

Hello, I have the following script while read id fraction do sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam done < fraction.txt where fraction.txt has two columns (id,fraction) and 50 rows I am unable to run this as bash is not able to read the second... (2 Replies)
Discussion started by: nans
2 Replies
TILESTACHE-SEED(1)					      General Commands Manual						TILESTACHE-SEED(1)

NAME
tilestache-seed - seed a single layer in your TileStache configuration SYNOPSIS
tilestache-seed [options] zoom... DESCRIPTION
This manual page documents briefly the tilestache-seed command. tilestache-seed seeds a single layer in your TileStache configuration. No images are returned, but TileStache ends up with a pre-filled cache. Bounding box is given as a pair of lat/lon coordinates, e.g. "37.788 -122.349 37.833 -122.246". Output is a list of tile paths as they are created. Configuration, BBox, and Layer options are required. REQUIRED OPTIONS
-c, --config file Path to configuration file. Required. -l, --layer layer Layer name from configuration. Required. -b, --bbox south west north east Bounding box in floating point geographic coordinates. Required. OPTIONS
-h, --help Show summary of options. -p, --padding padding Extra margin of tiles to add around bounded area. Default value is 0 (no extra tiles). -e, --extension extension Optional file type for rendered tiles. Default value is "png". -f, --progress-file file Optional JSON progress file that gets written on each iteration, so you don't have to pay close attention. -q Suppress chatty output, --progress-file works well with this. -i, --include-path Add the following colon-separated list of paths to Python's include path (aka sys.path). -d, --output-directory Optional output directory for tiles, to override configured cache with the equivalent of: {"name": "Disk", "path": <output directory>, "dirs": "portable", "gzip": []}. More information in http://tilestache.org/doc/#caches. --to-mbtiles Optional output file for tiles, will be created as an MBTiles 1.1 tileset. See http://mbtiles.org for more information. --from-mbtiles Optional input file for tiles, will be read as an MBTiles 1.1 tileset. See http://mbtiles.org for more information. Overrides --extension, --bbox and --padding (this may change). --tile-list Optional file of tile coordinates, a simple text list of Z/X/Y coordinates. Overrides --bbox and --padding. --error-list Optional file of failed tile coordinates, a simple text list of Z/X/Y coordinates. If provided, failed tiles will be logged to this file instead of stopping tilestache-seed. --enable-retries If true this will cause tilestache-seed to retry failed tile renderings up to (3) times. Default value is False. -x, --ignore-cached Re-render every tile, whether it is in the cache already or not. SEE ALSO
tilestache-render(1) AUTHOR
TileStache was written by Michal Migurski <mike@stamen.com>. This manual page was written by David Paleino <dapal@debian.org>, for the Debian project (and may be used by others). Nov 10, 2010 TILESTACHE-SEED(1)
All times are GMT -4. The time now is 08:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy