write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers:b:.help is appreciated.thank you. (3 Replies)
I have a file which has about 10000 records and I need to delete about 50 records from the file. I know line numbers and am using
sed '134,1357,......d' filename > new file.
It does not seem to be working.
Please Advice (5 Replies)
I have to find the number of rows in a file and delete those many rows in another file.
For example, if I have 3 rows in a file A, i have to delete first 3 rows in anothe file B,
I have the code, it works as standalone, when I merge this with m application (c with unix), it doesnt work.
... (2 Replies)
Hello. I have the following issue: my txt file has the following format:
train/dr4/fklc0/sx175.txt
0 80282 Severe myopia contributed to Ron's inferiority complex.
train/dr4/fklc0/sx355.txt
0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt
awk 'NR%2==0' test1.txt >... (4 Replies)
Hi,
I have a file will 1000 lines.... I want to deleted some line in the file... like 800-850 lines i want to remove in that...
can somebody help me..?
thanks. (2 Replies)
Hi All,
I have some 30,000 files in one directory. The files look like this:
computer
networks
router
wire
I want to remove those files which have less than 200 lines for example in the above file, the number of lines is 4.
I am trying something like this:
find /path/to/dir -type f... (5 Replies)
We are using Red Hat Linux.
I have a flat file with among other things, the following lines, which appear occasionally throughout the file:
Using sed, I delete this line:
L;L;L;L;R;R;R;L;R;L;R;R;R;L;L;L
With:
/^;;;;;*/d
Works fine every time.
However, I cannot delete... (6 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
Hi All,
I want to keep the name of the songs with their respective extensions only.
Sample Code
========
03 Choti choti gaiya choti choti gaval.mp3
03---Brazil Dhol.mp3
03 PAYALIYA .mp3
04 - Isq Risk .mp3
04%20-%20Oh%20My%20Love(wapking.in).mp3
08 - A2 - Aasan Nahin Yahan .mp3
AE... (3 Replies)
Discussion started by: Pramod_009
3 Replies
LEARN ABOUT REDHAT
grephistory
GREPHISTORY(1) General Commands Manual GREPHISTORY(1)NAME
grephistory - display file names from Usenet history file
SYNOPSIS
grephistory [ -e ] [ -f filename ] [ -h ] [ -i ] [ -l ] [ -n ] [ -q ] [ -s ] [ -t ] [ messageid ]
DESCRIPTION
Grephistory queries the dbz(3) index into the history(5) file for an article having a specified Message-ID or hash key of Message-ID.
If messageid cannot be found in the database, the program prints ``Not found'' and exits with a non-zero status. If messageid is in the
database, the program prints the token of the article and exits successfully.
OPTIONS -e If the ``-e'' flag is used, then grephistory will only print the filename of the token of an existing article.
-f To specify a different value for the history file and database, use the ``-f'' flag.
-h If the ``-h'' flag is used then the hash of the Message-ID will be printed regardless of its existense.
-i If the ``-i'' flag is used, then grephistory will read a list of Message-ID's on standard input, one per line. Leading and trailing
whitespace is ignored, as are any malformed lines. It will print on standard output those Message-ID's which are not found in the
history database. This flag is used in processing ``ihave'' control messages.
-l If the ``-l'' flag is used then the entire line from the history file will be displayed.
-n If no pathname exists, the program will print ``/dev/null'' and exit successfully. This can happen when an article has been can-
celed, or if it has been expired but its history is still retained. This is default behavior, which can be obtained by using the
``-n'' flag.
-q If the ``-q'' flag is used, then no message is displayed. The program will still exit with the appropriate exit status.
-s If the ``-s'' flag is used, then grephistory will read a similar list from its standard input. It will print on standard output a
list of filenames for each article that is still available. This flag is used in processing ``sendme'' control messages.
-t If the ``-t'' flag is used, then only the offset into the history text file is printed.
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.6.2.1, dated 2000/08/17.
SEE ALSO dbz(3), history(5), inn.conf(5).
GREPHISTORY(1)