Sponsored Content
Top Forums Shell Programming and Scripting Delete a line between selected lines using sed or any other command Post 302458485 by nehashine on Friday 1st of October 2010 02:19:45 AM
Old 10-01-2010
Its working perfectly in linux. Thanks a lot!!

If possible, Can you suggest something which is compatible in solaris also as this is not running is solaris Smilie

---------- Post updated at 11:49 AM ---------- Previous update was at 11:46 AM ----------

Vow, sed is working in both solaris as well as on linux.....
Really thanks a lot Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

using sed command to delete a string spanning multiple lines

file1 contains the following data sssssssssss firstline secondline pppppppppp ssssssssss Using sed comamnd i am trying to delete firtsline secondline. so, output should be sssssssssss pppppppppp ssssssssss I tried in the following the way, but it is not working. sed ... (9 Replies)
Discussion started by: radha.kalivar
9 Replies

2. Shell Programming and Scripting

SED delete only first line command - Help need

Can any one help me how the sed delete only first line command (D) works. sed -f sedcmds File.txt In this how the sed delete only first line command (D) works to delete the blank lines appearing more than ones leaving only one blank and deleting others blanks. While doing step by step when... (2 Replies)
Discussion started by: gwgreen1
2 Replies

3. Shell Programming and Scripting

Delete the lines if it matchs a selected string

HI, I need one help to generate the file based on few condition, I need to print only those line which has N and delete the line which as all Y's. ANd I need to compare only the fields which are marked as Y and N . And one more thing is in the below file 1 and file 2 and file2 abc, dbc can... (6 Replies)
Discussion started by: rashmisb
6 Replies

4. Shell Programming and Scripting

sed command to delete line

HI, Im using the below commmand to delete lines having "(" at the start of a line. sed -e '/^(/d' But i need a command to delete lines that has only "(" in it and no other strings. infile - asdf asdf ( asdf ( asd outfile (1 Reply)
Discussion started by: dvah
1 Replies

5. Shell Programming and Scripting

sed or awk delete character in the lines before and after the matching line

Sample file: This is line one, this is another line, this is the PRIMARY INDEX line l ; This is another line The command should find the line with “PRIMARY INDEX” and remove the last character from the line preceding it (in this case , comma) and remove the first character from the line... (5 Replies)
Discussion started by: KC_Rules
5 Replies

6. Shell Programming and Scripting

sed command to delete everything after > on line

I have a large data file that I need to edit. There are lines like, > <IDNUMBER> (ST000002) > <SUPPLIER> (ST000002) > <IDNUMBER> (ST000004) > <SUPPLIER> (ST000004) and I need to delete everything after the >, excepting the end of line. > <IDNUMBER> > <SUPPLIER> > <IDNUMBER> > ... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

7. Shell Programming and Scripting

sed to delete selected line from file

Ultimate goal is to delete lines from before and after a block of lines in a given file. First attempt was something like this: sed -e '1,/STARTUP/ d' inputfile.txt > outputfile.txt but that deleted everything down to and including the line with STARTUP. I need to delete everything before... (6 Replies)
Discussion started by: edstevens
6 Replies

8. Shell Programming and Scripting

sed command to grep multiple pattern present in single line and delete that line

here is what i want to achieve.. i have a file with below contents cat fileName blah blah blah . .DROP this REJECT that . --sport 7800 -j REJECT --reject-with icmp-port-unreachable --dport 7800 -j REJECT --reject-with icmp-port-unreachable . . . more blah blah blah --dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies

9. Shell Programming and Scripting

Delete selected lines

hi Gurus, I have a source file with more than 10 columns ( not fixed ) I want to delete all the lines on the following condition 1) where i have first column as "UPDATE PLAN ADD RATE SCHEDULE" and fourth column as null awk '($1=="UPDATE PLAN ADD RATE SCHEDULE" && $4=="") {print $0}'... (5 Replies)
Discussion started by: r_t_1601
5 Replies

10. Shell Programming and Scripting

How to delete line from file using sed command?

hello Team, I want to delete below linux using sed command but I am getting error.sed -i '/url=/status.cgi?hostgroup=/d' 3 error:sed: -e expression #1, char 32: unknown option to `s' Could you please help me with correct syntax. My line contain / character because of that I am getting... (4 Replies)
Discussion started by: ghpradeep
4 Replies
Net::DBus::Binding::Bus(3pm)				User Contributed Perl Documentation			      Net::DBus::Binding::Bus(3pm)

NAME
Net::DBus::Binding::Bus - Handle to a well-known message bus instance SYNOPSIS
use Net::DBus::Binding::Bus; # Get a handle to the system bus my $bus = Net::DBus::Binding::Bus->new(type => &Net::DBus::Binding::Bus::SYSTEM); DESCRIPTION
This is a specialization of the Net::DBus::Binding::Connection module providing convenience constructor for connecting to one of the well- known bus types. There is no reason to use this module directly, instead get a handle to the bus with the "session" or "system" methods in Net::DBus. METHODS
my $bus = Net::DBus::Binding::Bus->new(type => $type); my $bus = Net::DBus::Binding::Bus->new(address => $addr); Open a connection to a message bus, either a well known bus type specified using the "type" parameter, or an arbitrary bus specified using the "address" parameter. If the "private" parameter is set to a true value, then a private connection to the bus is obtained. The caller must explicitly disconnect this bus instance before releasing the last instance of the object. $bus->request_name($service_name) Send a request to the bus registering the well known name specified in the $service_name parameter. If another client already owns the name, registration will be queued up, pending the exit of the other client. my $name = $bus->get_unique_name Returns the unique name by which this processes' connection to the bus is known. Unique names are never re-used for the entire lifetime of the bus daemon. $bus->add_match($rule) Register a signal match rule with the bus controller, allowing matching broadcast signals to routed to this client. $bus->remove_match($rule) Unregister a signal match rule with the bus controller, preventing further broadcast signals being routed to this client AUTHOR
Daniel P. Berrange COPYRIGHT
Copyright (C) 2004-2011 Daniel P. Berrange SEE ALSO
Net::DBus::Binding::Connection, Net::DBus perl v5.14.2 2011-06-30 Net::DBus::Binding::Bus(3pm)
All times are GMT -4. The time now is 05:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy