I have a file which has number of pipe delimited records.
I am able to read the records....but I want to sort it after reading.
But I want to sort these records as per $usrId
Last edited by Franklin52; 12-14-2012 at 03:31 AM..
Reason: Please use code tags for data and code samples
I am trying to open a file and check a record. The file has 543267 records and I want to check the record 514455. I am trying to open in vi and go to that line
:514455 but i get the error not enough lines in buffer
How should i overcome this? Please help. (6 Replies)
Hi,
I am new to scripting. I need a script to sort and the records in a file and then split them into different files.
For example, the file is:
H1......................
H2......................
D2....................
D2....................
H1........................... (15 Replies)
Hi all,
I have a requirement where I need to read records one by one from a file. I have tried this below code:
while read mLine
do
echo 'Line = '${mLine}
done < input_file
--- But the problem here is im getting the records with removed spaces.
--Supposer if the record is like... (3 Replies)
i am reading an i/p file input.txt as below and want to read all filenames as in highlighted in bold below and put them in a different file output.txt. can someone help me with a shell script to do this? thanks in advance
regards
brad
input.txt
---------
START
TYPE:OPT
INIT_SEQ:01... (8 Replies)
hi,
I'm trying to sort a file which has 3.7 million records an gettign the following error...any help is appreciated...
sort: Write error while merging.
Thanks (6 Replies)
Hi,
I have 10000 records in my test.dat file
All records are under the following format
a,12,45,bn,c
a,16,46,bn1,c
a,18,47,bn2,c
a,12,47,bn3,c
a,11,49,bn4,c
I have to read each 2 records and assign it into a temp file
.Can anybody help me in this?
Thanks (3 Replies)
Hi all,
I So, I've got a monster text document comprising a list of various company names and associated info just in a long list one after another. I need to sort them alphabetically by name...
The text document looks like this:
Company Name:
the_first_company's_name_here
Address:... (2 Replies)
Hello!
Is there a way i can read a file with n records as one big string using linux shell script? I have a file in the below format -
REC1
REC2
REC3
.
.
.
REC4
Record length is 3000 bytes per record and with a newline char at the end. What i need to do is
- read this file as one... (5 Replies)
I need a script that will run in unix to:
1) Read and input file with 1 column that contains for ex:
0123456789
1234567890
...etc
2) Checks the first column if it is:
a. Numeric from 0 - 9
b. if it is not less... (4 Replies)
Hi All
Can anybody let me know the code to read a particular record from a file
For e.g.
File Name: File.txt
File content:
Script_path=/abc/def/script/
File_path=/xyz/data/
Business Date=19990905
SERVER_NAME=Server
DATABASE_NAME=Database
Login=NewUser
Password=NewPassword
... (3 Replies)
Discussion started by: Siddhartha9833
3 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)