I have a file containing the following contents
All of us, including Zippy, our dog
All of us, including Zippy and Zippy
All of us, including Zippy and Zippy and Zelda
Testing All of us Zippy
Now, i wanna grep and get the lines which has only one occurance of word Zippy and starting with... (1 Reply)
Hi all,
I have the following data in a file x.csv:
> ,this is some text here
> ,,,,,,,,,,,,,,,,2006/11/16,0.23
> ,,,,,,,,,,,,,,,,2006/12/16,0.88
< ,,,,,,,,,,,,,,,,this shouldnt be deleted
I need to use SED to match anything with a > in the line and delete that line, can someone help... (7 Replies)
I have a files in a directory in this format
data
data
data
---BEGIN CERT-----
data
data
data
---END CERT -----
Now, I want to extract the lines starting from --BEGIN CERT-- and write the contents till the end of file into a new file.How can I do this for all the files in the... (1 Reply)
Input:
a
b
b
c
d
d
I need:
a
c
I know how to get this (the lines that have duplicates) :
b
d
sort file | uniq -d
But i need opossite of this. I have searched the forum and other places as well, but have found solution for everything except this variant of the problem. (3 Replies)
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
hey guys,
I tried searching but most 'search and replace' questions are related to one liners.
Say I have a file to be replaced that has the following:
$ cat testing.txt
TESTING
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HHH
ENDTESTING
This is the input file: (3 Replies)
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Hello,
I have file of more than 10000 lines.
I want to delete 40 lines after every 20 lines.
e.g from a huge file, i want to delete line no from 34 - 74, then 94 - 134 etc and so on.
Please let me know how i can do it.
Best regards, (11 Replies)
Hi all, I was wondering if anyone would know how to search & delete inclusively between two lines, please:
Important:
There are multiple }; lines. I'm curious how to delete the correct one only.
Line numbers may vary each time this script is run.
For example, I'd like to delete only the... (6 Replies)
Discussion started by: chatguy
6 Replies
LEARN ABOUT DEBIAN
cartconvert
CARTCONVERT(1) GeographicLib Utilities CARTCONVERT(1)NAME
CartConvert -- convert geodetic coordinates to geocentric or local cartesian
SYNOPSIS
CartConvert [ -r ] [ -l lat0 lon0 h0 ] [ -e a f ] [ --comment-delimiter commentdelim ] [ --version | -h | --help ] [ --input-file infile |
--input-string instring ] [ --line-separator linesep ] [ --output-file outfile ]
DESCRIPTION
Convert geodetic coordinates to either geocentric or local cartesian coordinates. Geocentric coordinates have the origin at the center of
the earth, with the z axis going thru the north pole, and the x axis thru latitude = 0, longitude = 0. By default, the conversion is to
geocentric coordinates. Specifying -l lat0 lon0 h0 causes a local coordinate system to be used with the origin at latitude = lat0,
longitude = lon0, height = h0, z normal to the ellipsoid and y due north.
Geodetic coordinates are provided on standard input as a set of lines containing (blank separated) latitude, longitude (decimal degrees or
degrees, minutes and seconds), and height above the ellipsoid (meters). For each set of geodetic coordinates, the corresponding cartesian
coordinates x, y, z (meters) are printed on standard output.
OPTIONS -r perform the reverse projection. x, y, z are given on standard input and each line of standard output gives latitude, longitude,
height.
-e specify the ellipsoid via a f; the equatorial radius is a and the flattening is f. Setting f = 0 results in a sphere. Specify f < 0
for a prolate ellipsoid. A simple fraction, e.g., 1/297, is allowed for f. (Also, if f > 1, the flattening is set to 1/f.) By
default, the WGS84 ellipsoid is used, a = 6378137 m, f = 1/298.257223563.
--comment-delimiter
set the comment delimiter to commentdelim (e.g., "#" or "//"). If set, the input lines will be scanned for this delimiter and, if
found, the delimiter and the rest of the line will be removed prior to processing and subsequently appended to the output line
(separated by a space).
--version
print version and exit.
-h print usage and exit.
--help
print full documentation and exit.
--input-file
read input from the file infile instead of from standard input; a file name of "-" stands for standard input.
--input-string
read input from the string instring instead of from standard input. All occurrences of the line separator character (default is a
semicolon) in instring are converted to newlines before the reading begins.
--line-separator
set the line separator character to linesep. By default this is a semicolon.
--output-file
write output to the file outfile instead of to standard output; a file name of "-" stands for standard output.
EXAMPLES
echo 33.3 44.4 6000 | CartConvert
=> 3816209.60 3737108.55 3485109.57
echo 33.3 44.4 6000 | CartConvert -l 33 44 20
=> 37288.97 33374.29 5783.64
echo 30000 30000 0 | CartConvert -r
=> 6.483 45 -6335709.73
ERRORS
An illegal line of input will print an error message to standard output beginning with "ERROR:" and causes CartConvert to return an exit
code of 1. However, an error does not cause CartConvert to terminate; following lines will be converted.
SEE ALSO
The algorithm for converting geocentric to geodetic coordinates is given in Appendix B of C. F. F. Karney, Geodesics on an ellipsoid of
revolution, Feb. 2011; preprint <http://arxiv.org/abs/1102.1215>.
AUTHOR
CartConvert was written by Charles Karney.
HISTORY
CartConvert was added to GeographicLib, <http://geographiclib.sf.net>, in 2009-02. Prior to 2009-03 it was called ECEFConvert.
GeographicLib 1.21 2012-04-24 CARTCONVERT(1)