Hi ,
I have a huge file like this
=245 this is testing
=035 abc123
=245 this is testing1
=035 abc124
=245 this is testing2
=035 abc125
=035 abc126
=245 this is testing3
here i have to pull out those lines having two =035 instead of alternative 035 and 245 i.e extract... (18 Replies)
Hi!
In our current directory there are around 35000 files.
Out of these a few thousands(around 20000) start with, "testfiles9842323879838".
I want to count the number of files that have filenames starting with the above pattern. Please help me with the command i could use.
Thank... (7 Replies)
Hi guys,
I usualy am able to google awk stuff but I can't find it so far and there are so many awking gurus here that I will give it a shot.
I want to print $1;$3;"$5 up to the $NF". In other words, I can have 1000 colums, but need to have $5 up to the end.
I started with the idea of... (2 Replies)
Dear users,
I have a file like this:
geometry,geometry_vertex_count,Id,strnum,platecode,datatype,dtnum,refnum,appearance,disappeara,color,geogdesc,datatype_ft_style,import_notes
"<LineString><coordinates>-130.6539,51.5103,0
-130.7708,51.6287,0
-130.8356,51.6832,0
-130.9211,51.7772,0... (5 Replies)
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
I am new to ksh scripts. I would like to be able to read a file line by line from a certain line number. I have a specific line number saved in a variable, say $lineNumber. How can I start reading the file from the line number saved in $lineNumber? Thanks! (4 Replies)
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
I am trying to process only IonCode_odd #'s (always 4 digits starting with zero), but the below isn't working as expected. Is there a better way? Thank you :).
IonCode_0401_xxxx_xxxx_xxxx.bam
IonCode_0401_xxxx_xxxx_xxxx.bam.bai
IonCode_0401_xxxx_xxxx_xxxx.fastq... (2 Replies)
Discussion started by: cmccabe
2 Replies
LEARN ABOUT OSX
ecvt
ECVT(3) BSD Library Functions Manual ECVT(3)NAME
ecvt, fcvt, gcvt -- convert double to ASCII string
SYNOPSIS
#include <stdlib.h>
char *
ecvt(double value, int ndigit, int * restrict decpt, int * restrict sign);
char *
fcvt(double value, int ndigit, int * restrict decpt, int * restrict sign);
char *
gcvt(double value, int ndigit, char *buf);
DESCRIPTION
These functions are provided for compatibility with legacy code. New code should use the snprintf(3) function for improved safety and porta-
bility.
The ecvt(), fcvt() and gcvt() functions convert the double precision floating-point number value to a NUL-terminated ASCII string.
The ecvt() function converts value to a NUL-terminated string of exactly ndigit digits and returns a pointer to that string. The result is
padded with zeroes from left to right as needed. There are no leading zeroes unless value itself is 0. The least significant digit is
rounded in an implementation-dependent manner. The position of the decimal point relative to the beginning of the string is stored in decpt.
A negative value indicates that the decimal point is located to the left of the returned digits (this occurs when there is no whole number
component to value). If value is zero, it is unspecified whether the integer pointed to by decpt will be 0 or 1. The decimal point itself
is not included in the returned string. If the sign of the result is negative, the integer pointed to by sign is non-zero; otherwise, it is
0.
If the converted value is out of range or is not representable, the contents of the returned string are unspecified.
The fcvt() function is identical to ecvt() with the exception that ndigit specifies the number of digits after the decimal point (zero-padded
as needed).
The gcvt() function converts value to a NUL-terminated string similar to the %g printf(3) format specifier and stores the result in buf. It
produces ndigit significant digits similar to the %f printf(3) format specifier where possible. If ndigit does allow sufficient precision,
the result is stored in exponential notation similar to the %e printf(3) format specifier. If value is less than zero, buf will be prefixed
with a minus sign. A decimal point is included in the returned string if value is not a whole number. Unlike the ecvt() and fcvt() func-
tions, buf is not zero-padded.
RETURN VALUES
The ecvt(), fcvt() and gcvt() functions return a NUL-terminated string representation of value.
WARNINGS
The ecvt() and fcvt() functions return a pointer to internal storage space that will be overwritten by subsequent calls to either function.
The maximum possible precision of the return value is limited by the precision of a double and may not be the same on all architectures.
The snprintf(3) function is preferred over these functions for new code.
SEE ALSO printf(3), strtod(3)STANDARDS
The ecvt(), fcvt() and gcvt() functions conform to IEEE Std 1003.1-2001 (``POSIX.1'').
BSD May 31, 2007 BSD