10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have three files named ALL, MATCH, and DIFF. Match and diff have completely different records included in the "all" file, but the "all" file also has records not in either the Match or Diff files.
I know I can sort all three files together, one unique and one without that option to show which... (5 Replies)
Discussion started by: wbport
5 Replies
2. Shell Programming and Scripting
Hi,
I have a requirement.for eg: i have a text file with pipe symbol as delimiter(|) with 4 columns a,b,c,d. Here a and b are primary key columns..
i want to process that file to find the duplicates and null values are in primary key columns(a,b) . I want to write the unique records in which... (5 Replies)
Discussion started by: praveenraj.1991
5 Replies
3. Shell Programming and Scripting
I have a fixed width file. The records looks something similar to below:
Type ID SSN NAME .....AND SOME MORE FIELDS
A1 1234 .....
A1 1234 .....
B1 1234 .....
M2 4567 .....
M2 4567 .....
N2 4567 .....
N2 4567 .....
A1 9999
N2 9999
Now if A1 is present then B1 has to be present.... (2 Replies)
Discussion started by: Saanvi1
2 Replies
4. Shell Programming and Scripting
I have a sample txt file which has different variable lengths of 2,10,3,15.
What is the command that I need use in order to get the record count that has length '3'
Thanks (3 Replies)
Discussion started by: bobby1015
3 Replies
5. Shell Programming and Scripting
Hi all,
First off, Thank you all for the knowledge I have gleaned from this site!
Deleting Records from a text file... sed paragraphs
The following code works nearly perfect, however each time it is run on the log file it adds a newline at the head of the file, run it 5 times, it'll have 5... (1 Reply)
Discussion started by: Festus Hagen
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to use the sed command to delete some lines in a file and I was wondering whether there is a possibility of knowing which lines are deleted, or at least which line numbers.
Thanks (4 Replies)
Discussion started by: vanagreg
4 Replies
7. Shell Programming and Scripting
I need to generate exactly 102 duplicates in a file using sed.
Here's an example of my input:
Grid-ref = 1, 148
Grid-ref = 1, 311
Grid-ref = 1, 428
I need:
Grid-ref = 1, 148
Grid-ref = 1, 148
Grid-ref = 1, 148
Grid-ref = 1, 148
... repeated 102 times, then
Grid-ref = 1, 311... (2 Replies)
Discussion started by: Russ
2 Replies
8. Shell Programming and Scripting
Hi,
I have a .txt file (uniqfields.txt) with 3 fields separated by " | " (pipe symbol). This file contains unique values with respect to all these 3 fields taken together. There are about 40,000 SORTED records (rows) in this file. Sample records are given below.
1TVAO|OVEPT|VO... (2 Replies)
Discussion started by: RRVARMA
2 Replies
9. Programming
I am running the following Korn shell script:
#!/usr/bin/ksh
num_records=`sas "select count(*) from /users/abc/123/sasdata.sas7bdat"`
echo "$num_records"
The script keeps returning an invalid file error even though I am certain that the file really exists. Does anyone see anything wrong... (1 Reply)
Discussion started by: sasaliasim
1 Replies
10. Shell Programming and Scripting
I am having a "|" delimited flat file and I have to pick up all the records with the 2nd field having null value. Please suggest. (3 Replies)
Discussion started by: dsravan
3 Replies