I got an error when I ran my scripts using
But when I double checked my code, it was enclosed in single quotes.
Here is the code:
I tried grep -v "^ *$" $src but it did not work.
I tried the awk commands but nothing happened to the file.
---------- Post updated at 08:32 AM ---------- Previous update was at 08:30 AM ----------
Just wondering, is there an alternative to Gunzip -f <InpFile>? Because upon checking, when the file is gunzipped, it creates those white spaces in between records. When I try to extract using 7zip, it does not add the white spaces.
Last edited by Scott; 12-07-2010 at 10:04 AM..
Reason: Code tags
Can anyone help me find and replace blank rows in a file with a numeric value (ie blankrow=someTxtOrNumValue), the file is over 500,000 rows long so it would need to be the quickest way as I'll need to do this for multiple files...I would be greatfull for any suggestions....thanks
sample file:... (2 Replies)
¿How can i remove blank lines between all lines in a long text file?
Example
WrongFile.txt :
Line 1
Line 2
Line 3
CorrectFile.txt :
Line 1
Line 2
Line 3
Thanks in advance
:confused: (4 Replies)
Hi All,
I need to remove 1st 2 line from head and last 2 line from last.
I thought it would be possible by using the Head and tail command.
But after i am using it is not possible by it.
Example:Input file
1
2
3
4
5
Example: Output file
3
But my head and tail command are not... (12 Replies)
Hi,
I need help to remove blank rows at the end of file.
Sample data:
"Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91
"Tønsberg, Brygga Kino SF",Tønsberg,202-1,Tønsberg SF 4,202-1-4
,,,,
,,,,
,,,,
,,,,
Expected data:
"Oslo, Symra kino",Oslo,130-7,Symra 1,130-7-91
"Tønsberg, Brygga... (6 Replies)
Hi,
I am facing a problem related to removing blank lines from a text document.
Input
Error 17-05-2011 11:01:15 VisualSVN Server 2.1 1001
The following information was included with the event:
line3
line4
Error 17-05-2011 11:00:25 VisualSVN Server 2.1 ... (13 Replies)
Hi All,
I have many of files(.csv) of the format given below.
Date,Name,Location
04/02/2012,A,India
,B,China
,C,USA
Like this I have 1000's of rows and many columns in all my files.
I need a shell script to copy down the Date(in this example column1) to the next 2 rows below(in the... (8 Replies)
I am working on an assignment to pull all the records from excel sheet programatically and use the data for further calculations.
In this process, I first defined 10 records in excel sheet and executed the below code.
In the first run it is OK. But after deleting last few rows in excel sheet and... (0 Replies)
I've spent the past hour trying different things and googling for this solution and cannot find the answer. Found variations of this, but not this exact thing.
I have the following text, which is the output from our mainframe. Each field is on a separate line, with a blank line between each... (7 Replies)
Discussion started by: lupin..the..3rd
7 Replies
LEARN ABOUT SUSE
tcl_getdouble
Tcl_GetInt(3) Tcl Library Procedures Tcl_GetInt(3)__________________________________________________________________________________________________________________________________________________NAME
Tcl_GetInt, Tcl_GetDouble, Tcl_GetBoolean - convert from string to integer, double, or boolean
SYNOPSIS
#include <tcl.h>
int
Tcl_GetInt(interp, src, intPtr)
int
Tcl_GetDouble(interp, src, doublePtr)
int
Tcl_GetBoolean(interp, src, boolPtr)
ARGUMENTS
Tcl_Interp *interp (in) Interpreter to use for error reporting.
const char *src (in) Textual value to be converted.
int *intPtr (out) Points to place to store integer value converted from src.
double *doublePtr (out) Points to place to store double-precision floating-point value converted from src.
int *boolPtr (out) Points to place to store boolean value (0 or 1) converted from src.
_________________________________________________________________DESCRIPTION
These procedures convert from strings to integers or double-precision floating-point values or booleans (represented as 0- or 1-valued
integers). Each of the procedures takes a src argument, converts it to an internal form of a particular type, and stores the converted
value at the location indicated by the procedure's third argument. If all goes well, each of the procedures returns TCL_OK. If src does
not have the proper syntax for the desired type then TCL_ERROR is returned, an error message is left in the interpreter's result, and noth-
ing is stored at *intPtr or *doublePtr or *boolPtr.
Tcl_GetInt expects src to consist of a collection of integer digits, optionally signed and optionally preceded by white space. If the
first two characters of src after the optional white space and sign are "0x" then src is expected to be in hexadecimal form; otherwise, if
the first such character is "0" then src is expected to be in octal form; otherwise, src is expected to be in decimal form.
Tcl_GetDouble expects src to consist of a floating-point number, which is: white space; a sign; a sequence of digits; a decimal point;
a sequence of digits; the letter "e"; a signed decimal exponent; and more white space. Any of the fields may be omitted, except that the
digits either before or after the decimal point must be present and if the "e" is present then it must be followed by the exponent number.
Tcl_GetBoolean expects src to specify a boolean value. If src is any of 0, false, no, or off, then Tcl_GetBoolean stores a zero value at
*boolPtr. If src is any of 1, true, yes, or on, then 1 is stored at *boolPtr. Any of these values may be abbreviated, and upper-case
spellings are also acceptable.
KEYWORDS
boolean, conversion, double, floating-point, integer
TclTcl_GetInt(3)