I have a file with 14million lines and I would like to extract all the unique lines from the file into another text file.
For example:
Contents of file1
happy
sad
smile
happy
funny
sad
I want to run a command against file one that only returns the unique lines (ie 1 line for happy... (3 Replies)
Hi all! Im trying to extract a portion of text from a file and put it into a new file. I need all the lines between <Placement> and </Placement> including the Placemark lines themselves. Is there a way to extract all instances of these and not just the first one found? I've tried using sed and... (4 Replies)
I'm attempting to write a script to identify users who have sudo access on a server. I only want to extract the ID's of the sudo users after a unique line of text. The list of sudo users goes to the EOF so I only need the script to start after the unique line of text. I already have a script to... (1 Reply)
Is there a trick for copying from something like a powerpoint into vi? Every time I try to copy text from something like a powerpoint to vi my spacing gets messed up. I think it has something to do with my .vimrc file. When I renamed it was able to copy it in just fine so can someone please... (2 Replies)
Hi All,
I'm hoping this is an easy question, but I'm having a weird problem trying to simply copy and paste text from MS Windows (XP) Notepad and then pasting into vi or vim in AIX. When I type "oslevel" I get "5.3.0.0". The problem is that once the text is pasted, there are sections of text... (2 Replies)
I would like to replace ], with ]]], between /* SECTION2-BEGIN */ and /* SECTION2-END */ in my file. My file contains the following information:
/* SECTION1-BEGIN */
,
/* SECTION1-END */
/* SECTION2-BEGIN */
,
/* SECTION2-END */
/*... (5 Replies)
Hi All,
I want to extract the text between some pattern which occurs repeatedly in a file. For example my input is like,
/home/.....
..........java:25: cannot find symbol
............
/home/......
/home/.......
I want to display... (2 Replies)
I need to filter the text in between two patterns and output that to a different file. Please help me how to do it.
Ex:
.............
<some random text>
.............
Pattern_1
<Few lines that need to be output to different file>
Pattern_2
................
...............
<more text in... (4 Replies)
awk -F "" '/<TestName>|<testname>|<Offerer>|<offerer>|<Line1>|<line1>|<City>|<city>|<State>|<state>/ {print $2, $3}' OFS='\t' UBE3A.xml > UBE3A.txt
Is it possible to use the code above to search for a pattern that is non-unique?
For example, if I wanted to capture the<MethodList>|<string>... (6 Replies)
I am trying to use awk to print the unique entries in $2
So in the example below there are 3 lines but 2 of the lines match in $2 so only one is used in the output.
File.txt
chr17:29667512-29667673 NF1:exon.1;NF1:exon.2;NF1:exon.38;NF1:exon.4;NF1:exon.46;NF1:exon.47 703.807... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT DEBIAN
history
HISTORY(5) File Formats Manual HISTORY(5)NAME
history - record of current and recently expired Usenet articles
DESCRIPTION
The file /var/lib/news/history keeps a record of all articles currently stored in the news system, as well as those that have been received
but since expired. In a typical production environment, this file will be many megabytes.
The file consists of text lines. Each line corresponds to one article. The file is normally kept sorted in the order in which articles
are received, although this is not a requirement. Innd(8) appends a new line each time it files an article, and expire(8) builds a new
version of the file by removing old articles and purging old entries.
Each line consists of two or three fields separated by a tab, shown below as :
<Message-ID> date
<Message-ID> date files
The Message-ID field is the value of the article's Message-ID header, including the angle brackets.
The date field consists of three sub-fields separated by a tilde. All sub-fields are the text representation of the number of seconds
since the epoch -- i.e., a time_t; see gettimeofday(2). The first sub-field is the article's arrival date. If copies of the article are
still present then the second sub-field is either the value of the article's Expires header, or a hyphen if no expiration date was speci-
fied. If an article has been expired then the second sub-field will be a hyphen. The third sub-field is the value of the article's Date
header, recording when the article was posted.
The files field is a set of entries separated by one or more spaces. Each entry consists of the name of the newsgroup, a slash, and the
article number. This field is empty if the article has been expired.
For example, an article cross-posted to comp.sources.unix and comp.sources.d that was posted on February 10, 1991 (and received three min-
utes later), with an expiration date of May 5, 1991, could have a history line (broken into two lines for display) like the following:
<312@litchi.foo.com> 666162000~673329600~666162180
comp.sources.unix/1104 comp.sources.d/7056
In addition to the text file, there is a dbz(3z) database associated with the file that uses the Message-ID field as a key to determine the
offset in the text file where the associated line begins. For historical reasons, the key includes the trailing byte (which is not
stored in the text file).
HISTORY
Written by Rich $alz <rsalz@uunet.uu.net> for InterNetNews. This is revision 1.12, dated 1996/09/06.
SEE ALSO dbz(3z), expire(8), innd(8), news-recovery(8).
HISTORY(5)