Sponsored Content
Top Forums Shell Programming and Scripting Delete lines containing and remove the blank line at the same time Post 302650731 by ygemici on Monday 4th of June 2012 06:34:46 AM
Old 06-04-2012
or try
Code:
sed '/^$\|yum/d'

Code:
sed -n '/^$\|yum/!p'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

delete blank lines or lines with spaces only

hi there i'm trying to delete blank lines and or lines with spaces only from a series of files in an directory. to do so, i'm using this: for files in `ls /users/myname/pesop* 2>/dev/null` do grep -v ^$ $files > newfile mv newfile $files done now, this works great for blank lines but... (3 Replies)
Discussion started by: vascobrito
3 Replies

2. 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

3. Shell Programming and Scripting

Why cant i delete blank lines?

I have a sed pipeline: myVar=$(cat $FILE | sed -n '/regex/,/regex/{/regex/d;p}' | sed -n '/regex/!p' | sed -e s/*:// | sed /regex/,+8d \ ) sed '/^$/d' sed '/./!d' And i've tried to add that in a different order rather then just on the end..Why isnt it deleting all the blank... (2 Replies)
Discussion started by: omgsomuchppl
2 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

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

6. 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

7. Shell Programming and Scripting

Delete blank lines, if blank lines are more than one using shell

Hi, Consider a file named "testfile" The contents of file are as below first line added for test second line added for test third line added for test fourth line added for test fifth line added for test (5 Replies)
Discussion started by: anil8103
5 Replies

8. Shell Programming and Scripting

How to remove blank lines

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)
Discussion started by: mayursingru
13 Replies

9. UNIX for Advanced & Expert Users

Delete blank spaces and blank lines in a file

Hi Gurus, Somebody can say me how to delete blank spaces and blank lines in a file unix, please. Thank you for advanced. (10 Replies)
Discussion started by: systemoper
10 Replies

10. UNIX for Beginners Questions & Answers

Delete multiple lines between blank lines containing two patterns

Hi all, I'm looking for a way (sed or awk) to delete multiple lines between blank lines containing two patterns ex: user: alpha parameter_1 = 15 parameter_2 = 1 parameter_3 = 0 user: alpha parameter_1 = 15 parameter_2 = 1 parameter_3 = 0 user: alpha parameter_1 = 16... (3 Replies)
Discussion started by: ce9888
3 Replies
YUM-CHANGELOG.CONF(5)						   File Formats 					     YUM-CHANGELOG.CONF(5)

NAME
yum-changelog.conf(5) SYNOPSIS
yum-changelog.conf(5) is the configuration file for yum-changelog(1) Yum plugin for viewing package changelogs before/after updating. By default, this plugin will show the changelogs before the updates. FILES
/etc/yum/pluginconf.d/changelog.conf FILE FORMAT
yum-changelog.conf(5) utilizes configuration options in the form of OPTION=VALUE OPTION
when This option reflects when yum-changelog(1) will allow changelog viewing during yum updates. VALUE
pre To make yum-changelog(5) show the changelog before the yum updates post To make yum-changelog(5) show the changelog after the yum updates. OPTION
always This option reflects specifies if the changelog should always be shown. VALUE
true The changelog is always displayed. false A command line option is required for the changelog to be displayed. OPTION
updateinfo This option specifies that the "changelog" from the repo. updateinfo should be shown. VALUE
true The updateinfo is displayed. false The updateinfo is never displayed. OPTION
updateinfo_always This option reflects specifies if the "changelog" from the repo. should always be shown (note that if updateinfo is false then this option has no meaning). VALUE
true The updateinfo is always displayed. false A command line option is required for the updateinfo to be displayed. AUTHOR
Chitlesh Goorah <chitlesh@fedoraproject.org> SEE ALSO
yum-changelog(1) 08 FEBRUARY 2007 YUM-CHANGELOG.CONF(5)
All times are GMT -4. The time now is 04:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy