Hi,
I want to delete the initial few lines (or even bytes) from a file.
I want to do this from a C function & this is in Linux platform.
The truncate & ftruncate is allowing me to delete bytes from the end only.
Any linux C function calls or ideas or any suggestions??
I'm in a dead... (2 Replies)
My data is xml'ish (here is an excerpt) :-
<bag name="mybag1" version="1.0"/>
<contents id="coins"/>
<bag name="mybag2" version="1.1"/>
<contents id="clothes"/>
<contents id="shoes"/>
<bag name="mybag3" version="1.6"/>
I want to delete line containing mybag2 and its subsequent... (5 Replies)
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Folks,
How do i delete an entire line that starts with blank space?
Ex: I have a file like below.
abc def (10/12) ghi
_________ jkl
_________ mno
pqr stu (11/12) vwx
I need the ouput like
abc def (10/12) ghi
pqr stu (11/12) vwx
Thanks for your elp in advance !!!! (2 Replies)
Hi all,
I need a Perl one liner which prints a newline into a .txt file, only where the line starts with "/mediawiki-1.19.0/". It should add the newline to the line before.
My problem is, when I try to realize this (with my little knowledge :rolleyes: ) i come to the point where the // are... (4 Replies)
e.g.
File name: File.txt
cat File.txt
Result:
#INBOUND_QUEUE=FAQ1
INBOUND_QUEUE=FAQ2
I want to get the value for one which is not commented out.
Thanks, (3 Replies)
Hello,
I'm looking to check only the first line of a file to see if it is a format string, like
# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*- vim:fenc=utf-8:ft=tcl:et:sw=2:ts=2:sts=2if the first line is anything else, insert the above string.
I'd... (3 Replies)
Shell : bash
OS : RHEL 6.8
I have a file like below.
$ cat pattern.txt
hello
txt1
txt2
txt3
some other text
txt4
I want to remove all lines in this file except the ones starting with txt . How can I do this ? (4 Replies)
Discussion started by: omega3
4 Replies
LEARN ABOUT OSF1
insdelln
curs_deleteln(3) Library Functions Manual curs_deleteln(3)NAME
curs_deleteln, deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln - Delete or insert lines in a Curses window
SYNOPSIS
#include <curses.h>
int deleteln(
void ); int wdeleteln(
WINDOW *win ); int insdelln(
int n ); int winsdelln(
WINDOW *win,
int n ); int insertln(
void ); int winsertln(
WINDOW *win );
LIBRARY
Curses Library (libcurses)
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
deleteln, wdeleteln, insdelln, winsdelln, insertln, winsertln: XCURSES4.2
Refer to the standards(5) reference page for more information about industry standards and associated tags.
DESCRIPTION
The deleteln and wdeleteln routines do the following: Delete the line under the cursor in the current or specified window Move all lines
below the current line up one line Clear the bottom line of the window
These routines do not change the cursor position. (This does not imply use of a hardware delete line feature.)
The insdelln and winsdelln routines do the following: For positive n, insert n lines into the current or specified window above the current
line
The n bottom lines are lost. For negative n, delete n lines (starting with the one under the cursor), and move the remaining lines
up
The bottom n lines are cleared.
These routines do not change the current cursor position.
The insertln and insertln routines insert a blank line above the current line. The bottom line is lost. (This does not imply use of a hard-
ware insert line feature.)
NOTES
The header file <curses.h> automatically includes the header file <stdio.h>.
Note that all routines except winsdelln may be macros.
RETURN VALUES
All routines return ERR upon failure and OK upon successful completion.
SEE ALSO
Functions: curses(3)
Others: standards(5)curs_deleteln(3)