Sponsored Content
Full Discussion: empty line
Top Forums Shell Programming and Scripting empty line Post 84112 by YoYo on Wednesday 21st of September 2005 07:59:31 PM
Old 09-21-2005
empty line

new problem comes out..

unix script calls sql script and save the output into a file. but now there are many empty lines in the output file.

first line is empty and follow by 13 rows of data and another empty line and data and so on..

how can I fix that?

thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why does '$$' means an empty line in agrep -d '$$'

Hi all, Why does '$$' means an empty line in agrep -d '$$'. I did not know that '$$' can be seen as an empty line in regular expression. So did I miss something here ? Thanks! (4 Replies)
Discussion started by: qiulang
4 Replies

2. Shell Programming and Scripting

howto add line as a first line into a non empty file

Hi Trying to do like this : echo "$variable1\n $(cat file.txt)" but it only adds one time. When I run this cmd again with different variable it only replaces line of variable1. How to add constantly line into first line in file ? (3 Replies)
Discussion started by: presul
3 Replies

3. Shell Programming and Scripting

Fill the empty line by adding line before blank line

FIle A "A" 2 aa 34 3 ac 5 cd "B" 3 hu 67 4 fg 5 gy output shud be A"" 2 aa 34 "A" 3 ac 34 "A" 5 cd 34 "B" 3 hu 67 "B" 4 fg 67 "B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies

4. Shell Programming and Scripting

Adding New empty line in a file

Hi, I am new to Sed /awk commands. using that i want to add new empty line after every line in a file by leaving first three lines. So, can any one help me out how to achieve this. Example: --------- Input Filename: file1.txt Input Data: --------Report-------- Date:20-10-03... (4 Replies)
Discussion started by: G.K.K
4 Replies

5. Shell Programming and Scripting

How To Erase a line is a row is empty?

Hi! i've been reading you guys for some time, now there is something I couldn't find here, I'm trying to purge some data for my thesis but my measurements have some gaps in the third columns. The solution is simple, -Erase those lines where the third column is empty ¿How? example... (1 Reply)
Discussion started by: AriasFco
1 Replies

6. Shell Programming and Scripting

Remove empty line and the next one

Hi all, I'm trying to remove when this condition is met: an empty and the next one I'm using this command: sed '/^$/N; s/&//' file Which searches for an empty line, N attaches it to the next line, and substituing the combination with nothing.... but it is not working. What I'm missing... (1 Reply)
Discussion started by: meuser
1 Replies

7. Shell Programming and Scripting

I need to know how to replace a line after a pattern match with an empty line using SED

Hi How Are you? I am doing fine! I need to go now? I will see you tomorrow! Basically I need to replace the entire line containing "doing" with a blank line: I need to the following output: Hi How Are you? I need to go now? I will see you tomorrow! Thanks in advance.... (1 Reply)
Discussion started by: sags007_99
1 Replies

8. Programming

[SOLVED] C++ print next line until line.empty

Hi, could you please help with the following: I have an input file like: one two three four five six I want to print the lines starting from 'three' to the empty line. Something like that: if ( line == "three" ) { while ( !line.empty() ) { cout <<... (0 Replies)
Discussion started by: apenkov
0 Replies

9. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

10. Shell Programming and Scripting

How to remove empty line.?

Hi gurus, I have a script which works fine. https://www.unix.com/shell-programming-and-scripting/239347-how-pass-string-into-sql-query.html while read p do && para="'${p}'" || para="${para},'${p}'" done < filePlease use code tags as required by forum rules! a few days... (6 Replies)
Discussion started by: ken6503
6 Replies
COLCRT(1)						      General Commands Manual							 COLCRT(1)

NAME
colcrt - filter nroff output for CRT previewing SYNOPSIS
colcrt [ - ] [ -2 ] [ file ... ] DESCRIPTION
Colcrt provides virtual half-line and reverse line feed sequences for terminals without such capability, and on which overstriking is destructive. Half-line characters and underlining (changed to dashing `-') are placed on new lines in between the normal output lines. The optional - suppresses all underlining. It is especially useful for previewing allboxed tables from tbl(1). The option -2 causes all half-lines to be printed, effectively double spacing the output. Normally, a minimal space output format is used which will suppress empty lines. The program never suppresses two consecutive empty lines, however. The -2 option is useful for sending output to the line printer when the output contains superscripts and subscripts which would otherwise be invisible. A typical use of colcrt would be tbl exum2.n | nroff -ms | colcrt - | more SEE ALSO
nroff/troff(1), col(1), more(1), ul(1) BUGS
Should fold underlines onto blanks even with the `-' option so that a true underline character would show; if we did this, however, colcrt wouldn't get rid of cu'd underlining completely. Can't back up more than 102 lines. General overstriking is lost; as a special case `|' overstruck with `-' or underline becomes `+'. Lines are trimmed to 132 characters. Some provision should be made for processing superscripts and subscripts in documents which are already double-spaced. 3rd Berkeley Distribution May 7, 1986 COLCRT(1)
All times are GMT -4. The time now is 06:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy