Sponsored Content
Full Discussion: How to remove blank lines
Top Forums Shell Programming and Scripting How to remove blank lines Post 302524967 by mayursingru on Wednesday 25th of May 2011 08:16:46 AM
Old 05-25-2011
How to remove blank lines

Hi,
I am facing a problem related to removing blank lines from a text document.

Code:
 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    1001    
 
The following information was included with the event:  
 
line3

line4

Expected Output
Code:
Error    17-05-2011 11:01:15    VisualSVN Server 2.1    1001     
The following information was included with the event:  
line3line4 
  
Error    17-05-2011 11:00:25    VisualSVN Server 2.1    1001     
The following information was included with the event:  
line3line4

I tried using
Code:
 sed '/^$/d' filename

but to no avail.

Regards,
Mayur
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Remove blank lines

¿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)
Discussion started by: osymad
4 Replies

2. UNIX for Dummies Questions & Answers

remove blank lines in *.srt file :)

Hi all, I use translate web to get subtitle file in my langues . But in output file have bad blank lines . I need scrip (i use debian ) to remove this blank lines . szintax of my bad *.srt file : ------ number blank1 number:number ---> number:number blank2 text1 . textn blankS... (10 Replies)
Discussion started by: hungbp
10 Replies

3. UNIX for Advanced & Expert Users

How to Remove the unwanted Blank Lines

I have a file with the below data, i would like to remove the end blank lines with no data. I used the below commands but could not able to succeed, could you please shed some light. Commands Used: sed '/^$/d' input.txt > output.txt grep -v '^$' input.txt > output.txt input.txt file... (5 Replies)
Discussion started by: Ariean
5 Replies

4. Shell Programming and Scripting

remove blank lines

I have joined 2 files. Join command worked fine. but the result showing extra blank lines. I tried to remove blank spaces by using awk (-- -42 RS= ORS="\n\n" file.txt) and sed (sed '/^ *$/d' file.txt)commands but didn't remove any Any suggestions plz:D 123 tab ....... ......tab .......234... (3 Replies)
Discussion started by: repinementer
3 Replies

5. Shell Programming and Scripting

Can't remove blank lines from a file

Hi Guys, I have been trying to remove blank lines from a file with no success. I tried using all the following options on the file: tr -s '\n' < abc.txt grep -v "^$" abc.txt sed '/^$/d' abc.txt sed '/./!d' abc.txt awk '/./' abc.txt The file is a text file. (11 Replies)
Discussion started by: npatwardhan
11 Replies

6. Shell Programming and Scripting

Remove blank lines

I really hope someone can help me with this. I have several php files from a forum that I run, that now for some reason have blank lines after every line. Is there an easy way to make a script that does the following: * If there are consecutive blank lines, delete all of them except one. * If... (9 Replies)
Discussion started by: KidCactus
9 Replies

7. Shell Programming and Scripting

remove blank lines and merge lines in shell

Hi, I'm not a expert in shell programming, so i've come here to take help from u gurus. I'm trying to tailor a csv file that i got to make it work for the LOAD FROM command. I've a datatable csv of the below format - --in file format xx,xx,xx ,xx , , , , ,,xx, xxxx,, ,, xxx,... (11 Replies)
Discussion started by: dvah
11 Replies

8. UNIX and Linux Applications

remove all blank lines

When I 'vi' my test file I see some blank lines. However once I do :set list to display hidden characters, I see the empty lines literally like this: ^I$ How do I remove them? I cannot find a regex to match them. (3 Replies)
Discussion started by: alexsuv
3 Replies

9. Shell Programming and Scripting

Remove Blank lines in VI

Hi, Which option is used to remove blank lines in VI (AIX). ? Regards, Siva (6 Replies)
Discussion started by: ksgnathan
6 Replies

10. UNIX for Dummies Questions & Answers

Remove blank lines using cat command

plz help me to figure it out how i remove empty or blank files using cat command. i will be very thankful if u send me this answer... thanks (3 Replies)
Discussion started by: mushfiks1
3 Replies
Net::EPP::ResponseCodes(3pm)				User Contributed Perl Documentation			      Net::EPP::ResponseCodes(3pm)

NAME
Net::EPP::ResponseCodes - a module to export some constants that correspond to EPP response codes SYNOPSIS
use Net::EPP::ResponseCodes; use Net::EPP::Simple; use strict; my $epp = Net::EPP::Simple->new( host => 'epp.nic.tld', user => 'my-id', pass => 'my-password', ); my $result = $epp->domain_transfer_request('example.tld', 'foobar', 1); if ($result) { print "Transfer initiated OK "; } else { if ($Net::EPP::Simple::Code == OBJECT_PENDING_TRANSFER) { print "Error: domain is already pending transfer "; } elsif ($Net::EPP::Simple::Code == INVALID_AUTH_INFO) { print "Error: invalid authcode provided "; } elsif ($Net::EPP::Simple::Code == OBJECT_DOES_NOT_EXIST) { print "Error: domain not found "; } elsif ($Net::EPP::Simple::Code == STATUS_PROHIBITS_OP) { print "Error: domain cannot be transferred "; } else { print "Error code $Net::EPP::Simple::Code "; } } DESCRIPTION
EPP is the Extensible Provisioning Protocol. EPP (defined in RFC 4930) is an application layer client-server protocol for the provisioning and management of objects stored in a shared central repository. Specified in XML, the protocol defines generic object management operations and an extensible framework that maps protocol operations to objects. As of writing, its only well-developed application is the provisioning of Internet domain names, hosts, and related contact details. Every response sent to the client by an EPP server contains a "<result>" element that has a "code" attribute. This is a four-digit numeric code that describes the result of the request. This module exports a set of constants that provide handy mnemonics for each of the defined codes. EXPORTS
"Net::EPP::ResponseCodes" exports the following constants. The number in brackets is the integer value associated with the constant. Successful command completion responses(1nnn) OK(1000) OK_PENDING(1001) OK_NO_MESSAGES(1300) OK_MESSAGES(1301) OK_BYE(1500) Command error responses(2nnn) Protocol Syntax UNKNOWN_COMMAND(2011) SYNTAX_ERROR(2011) USE_ERROR(2011) MISSING_PARAM(2011) PARAM_RANGE_ERROR(2011) PARAM_SYNTAX_ERROR(2011) Implementation-specific Rules UNIMPLEMENTED_VERSION(2100) UNIMPLEMENTED_COMMAND(2101) UNIMPLEMENTED_OPTION(2102) UNIMPLEMENTED_EXTENSION(2103) BILLING_FAILURE(2104) NOT_RENEWABLE(2105) NOT_TRANSFERRABLE(2106) Security(22nn) AUTHENTICATION_ERROR(2200) AUTHORISATION_ERROR(2201) AUTHORIZATION_ERROR(2201) INVALID_AUTH_INFO(2202) Data Management(23nn) OBJECT_PENDING_TRANSFER(2300) OBJECT_NOT_PENDING_TRANSFER(2301) OBJECT_EXISTS(2302) OBJECT_DOES_NOT_EXIST(2303) STATUS_PROHIBITS_OP(2304) ASSOC_PROHIBITS_OP(2305) PARAM_POLICY_ERROR(2306) UNIMPLEMENTED_OBJECT_SERVICE(2307) DATA_MGMT_POLICY_VIOLATION(2308) Server System(24nn) COMMAND_FAILED(2400) Connection Management(25nn) COMMAND_FAILED_BYE(2500) AUTH_FAILED_BYE(2501) SESSION_LIMIT_EXCEEDED_BYE(2502) AUTHOR
CentralNic Ltd (<http://www.centralnic.com/>). COPYRIGHT
This module is (c) 2012 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
o Net::EPP::Client o Net::EPP::Frame o Net::EPP::Proxy o RFCs 4930 and RFC 4934, available from <http://www.ietf.org/>. o The CentralNic EPP site at <http://www.centralnic.com/resellers/epp>. perl v5.14.2 2012-04-23 Net::EPP::ResponseCodes(3pm)
All times are GMT -4. The time now is 02:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy