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)
can't figure out a way to delete multiple empty lines but keep single empty lines in a file, file is like this
#cat file
1
2
3
4
5
6
-
What I want is
1
2 (6 Replies)
I am attempting to delete blank lines in my file and I've used this command:
sed '/^$/d' $file > $file.fixed
all this seems to do is copy the file and not delete the blank lines located at the end of the file. Any assistance would be greatly appreciated. (3 Replies)
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)
Hi,
I want to use diff to compare two files in a Perl file. But one of the files has some blank lines at the end. So I want to delete the blank lines from the file firstly and then use diff to compare them. But I dont know how to delete the blank lines from the files. Meanwhile, the system is... (5 Replies)
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)
Hi,
I tried the following options but was unable to delete blank lines from file
Input file = temp.hash.txt
temp.hash.txt content
90
0
89.56
0
0
57575.4544
56.89 (9 Replies)
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
LEARN ABOUT NETBSD
curses_scroll
CURSES_SCROLL(3) BSD Library Functions Manual CURSES_SCROLL(3)NAME
curses_scroll, scrl, wscrl scroll, scrollok, setscrreg, wsetscrreg -- curses window scrolling routines
LIBRARY
Curses Library (libcurses, -lcurses)
SYNOPSIS
#include <curses.h>
int
scrl(int n);
int
wscrl(WINDOW *win, int n);
int
scroll(WINDOW *win);
int
scrollok(WINDOW *win, boolf flag);
int
setscrreg(int top, int bottom);
int
wsetscrreg(WINDOW *win, int top, int bottom);
DESCRIPTION
These functions scroll areas on stdscr or on the specified window.
The scrl() function scrolls stdscr by n lines. If n is positive then then stdscr is scrolled up. n lines are lost from the top of stdscr
and n blank lines are inserted at the bottom. If n is negative then stdscr is scrolled down. n blank lines are inserted at the top of
stdscr and n lines are lost from the bottom.
The wscrl() function is the same as the scrl() function, excepting that it scrolls the window specified by win.
The scroll() function scrolls the window win up by one line.
The scrolling behaviour of a window can be controlled by using the scrollok() function. If the flag argument is TRUE then a line wrap at the
bottom of the window will cause the window to be scrolled up one line, if flag is FALSE then lines that would force a scroll will be trun-
cated.
The setscrreg() function sets up a software scrolling region on stdscr which will define a region of the screen that will be scrolled. The
scrolling of this region is also controlled by the scrollok() function.
The wsetscrreg() function does the same as the setscrreg() function, except that the scrolling region is set on the window specified by win.
If a scrolling region has been set with the setscrreg() or wsetscrreg() functions and the current cursor position is inside the scrolling
region, then only the area inside the scrolling region is scrolled.
RETURN VALUES
Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following
values:
OK The function completed successfully.
ERR An error occurred in the function.
SEE ALSO curses_deleteln(3), curses_insdelln(3), curses_insertln(3)STANDARDS
The NetBSD Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.
HISTORY
The Curses package appeared in 4.0BSD.
BSD August 12, 2002 BSD