Hi,
I have an urgent task here. I am required to sort a flat file based on multiple columns which are based on the character position in that line. I am restricted to use the character position instead of the space and sort +1 +2 etc to do the sorting.
I understand that there is a previous... (8 Replies)
I have 20000 numbers present in a file in each line like
25663,
65465,
74579,
56446,
..
..
I have created a table in db with single number column in it.
create table testhari (no number(9));
I want to insert all these numbers into that table. how can i do it?
can anybody please... (4 Replies)
Hi,
As part of migrating a script from SunOS to MP RAS, the following script is not functioning in desired way.
sort -t\| -u +6 -7 +12 -14 textfile1.out > \
textfile2uniq.out
The -u is fetching unique records differently on SunOS and MP RAS Pentium IV. And thus the records... (1 Reply)
Hi gurus, hoping someone can help with a sed line that can do the following...
I have a flat file with about 1000 records, but in order to import into openoffice spreadsheet, I need to create a delimited file. I'd like to do 2 things with the SED command:
1- add a pipe character "|" at the end... (4 Replies)
I have a fixed length file that need to be sorted according to the following rule
IF B=1 ORDER by A,B
Else ORDER by A,C
Input file is
ABC
131
112
122
231
212
222
Output needed
ABC
112
131
122
212
231
222 (1 Reply)
hi,
Please suggest me how to do this logic
say i am dynamically taking a file name into the script.
when ever a file name it should sort the all the records based on the first character in every line except the heading line and ending line.
for example
file1
heading... (1 Reply)
I have a flat file that contains records similar to the following two lines;
1984/11/08 7 700000 123456789 2
1984/11/08 1941/05/19 7 700000 123456789 2
The 123456789 2 represents an account number, this is how I identify the duplicate record.
The ### signs represent... (4 Replies)
Hi Everyone,
I have below record set. File is fixed widht file
101newjersyus 20150110
101nboston us 20150103
102boston us 20140106
102boston us 20140103
I need to group record based on first 3 letters in our case(101 and 102)
and sort last 8 digit in ascending order and print only... (4 Replies)
I have a texinfo file containing book records and I want to sort them. An example is shown below.
Records are separated by two blank lines. The sort pattern I want to sort is starting from the beginning of the year declaration and finishing at the beginning of the book title where I use the... (4 Replies)
Discussion started by: Danette
4 Replies
LEARN ABOUT BSD
sortbib
SORTBIB(1) General Commands Manual SORTBIB(1)NAME
sortbib - sort bibliographic database
SYNOPSIS
sortbib [ -sKEYS ] database ...
DESCRIPTION
Sortbib sorts files of records containing refer key-letters by user-specified keys. Records may be separated by blank lines, or by .[ and
.] delimiters, but the two styles may not be mixed together. This program reads through each database and pulls out key fields, which are
sorted separately. The sorted key fields contain the file pointer, byte offset, and length of corresponding records. These records are
delivered using disk seeks and reads, so sortbib may not be used in a pipeline to read standard input.
By default, sortbib alphabetizes by the first %A and the %D fields, which contain the senior author and date. The -s option is used to
specify new KEYS. For instance, -sATD will sort by author, title, and date, while -sA+D will sort by all authors, and date. Sort keys
past the fourth are not meaningful. No more than 16 databases may be sorted together at one time. Records longer than 4096 characters
will be truncated.
Sortbib sorts on the last word on the %A line, which is assumed to be the author's last name. A word in the final position, such as
``jr.'' or ``ed.'', will be ignored if the name beforehand ends with a comma. Authors with two-word last names or unusual constructions
can be sorted correctly by using the nroff convention `` '' in place of a blank. A %Q field is considered to be the same as %A, except
sorting begins with the first, not the last, word. Sortbib sorts on the last word of the %D line, usually the year. It also ignores lead-
ing articles (like ``A'' or ``The'') when sorting by titles in the %T or %J fields; it will ignore articles of any modern European lan-
guage. If a sort-significant field is absent from a record, sortbib places that record before other records containing that field.
SEE ALSO refer(1), addbib(1), roffbib(1), indxbib(1), lookbib(1)AUTHORS
Greg Shenaut, Bill Tuthill
BUGS
Records with missing author fields should probably be sorted by title.
4.2 Berkeley Distribution April 29, 1985 SORTBIB(1)