01-18-2013
Hello Don,
Many thanks for your answer, I've tested with 53 lines and worked fine.
My real file has more than a million lines, I hope work relative fast and with correct output.
Many thanks again!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have two files. 1st file has 1 column (huge file containing ~19200000 lines) and 2nd file has 2 columns (small file containing ~6000 lines).
#################################
huge_file.txt
a
a
ab
b
##################################
small_file.txt
a 1.5
b 2.5
ab ... (4 Replies)
Discussion started by: AshwaniSharma09
4 Replies
2. Shell Programming and Scripting
hello,
I had posted earlier help for a script for splitting concatenated words . The script was supposed to read words from a master file and split concatenated words in the slave/input file.
Thanks to the help I got, the following script which works very well was posted. It detects residues by... (14 Replies)
Discussion started by: gimley
14 Replies
3. Shell Programming and Scripting
Hi,
I have a file filled with search strings which have a blank in between and look like this:
S. g. Ehr.
o. Jg.
v. d. Chijs
g. Ehr.
Now i would like to search for the strings and it also shall return the next column after the match.
awk -v FILE="search_strings.txt" 'BEGIN {... (10 Replies)
Discussion started by: sdf
10 Replies
4. Shell Programming and Scripting
I have a file with many lines which contain strings like .. etc.
But with no rule regarding field separators or anything else.
I want to print ONLY THE STRING from each line , not the entire line !!!
For example from the lines :
Flow on service executed with success in . Performances... (5 Replies)
Discussion started by: black_fender
5 Replies
5. Shell Programming and Scripting
Hi
I have a problem where I have a large amount of files that I need to scan and return a line and its following line, but only when the following line begins with a string.
String one - line one must begin with 'Bill'
String two - line two must begin with 'Jones'.
If these two... (7 Replies)
Discussion started by: majormajormajor
7 Replies
6. UNIX for Dummies Questions & Answers
URGENT HELP IS NEEDED!!
I am looking to move matching lines (01 - 07) from File1 and 77 tab the matching string from File2, to File3.txt. I am almost done but
- Currently, script is not printing lines to File3.txt in order.
- Also the matching lines are not moving out of File1.txt
... (1 Reply)
Discussion started by: High-T
1 Replies
7. Shell Programming and Scripting
Hello,
I have a file contains two columns. I need to print the lines after “xxx” so i'm trying to match "xxx" & cut the lines after that. I'm trying with the grep & cut command, if there any simple way to extract this please help me.
Sample file :
name id
AAA 123
AAB 124
AAC 125... (4 Replies)
Discussion started by: Shenbaga.d
4 Replies
8. Shell Programming and Scripting
Trying to use awk to match the contents of each line in file1 with $5 in file2. Both files are tab-delimited and there may be a space or special character in the name being matched in file2, for example in file1 the name is BRCA1 but in file2 the name is BRCA 1 or in file1 name is BCR but in file2... (6 Replies)
Discussion started by: cmccabe
6 Replies
9. Shell Programming and Scripting
In the awk below, what I am attempting to do is check each line in the tab-delimeted input, which has ~20 lines in it, for a keyword
SVTYPE=Fusion. If the keyword is found I am splitting $3 using the . (dot) and reading the portion before and after the dot in an array a.
If it does have that... (12 Replies)
Discussion started by: cmccabe
12 Replies
10. Shell Programming and Scripting
In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
Discussion started by: cmccabe
0 Replies
LEARN ABOUT ULTRIX
colcrt
colcrt(1) General Commands Manual colcrt(1)
Name
colcrt - filter nroff output for CRT previewing
Syntax
colcrt [-] [-2] [file...]
Description
The command provides virtual half-line and reverse line feed sequences for terminals without such capability, and on which overstriking is
destructive. Half-line characters and underlining (changed to dashing `-') are placed on new lines in between the normal output lines.
Options
- Suppresses all underlining. It is especially useful for previewing allboxed tables from
-2 Causes half-lines to be printed, double spacing the output. Normally, a minimal space output format is used which will suppress empty
lines. The program never suppresses two consecutive empty lines, however. The -2 option is useful for sending output to the line
printer when the output contains superscripts and subscripts which would otherwise be invisible.
Examples
A typical use of would be:
tbl exum2.n | nroff -ms | colcrt - | more
Restrictions
Can't back up more than 102 lines.
General overstriking is lost; as a special case `|' overstruck with `-' or underline becomes `+'.
Lines are trimmed to 132 characters.
See Also
col(1), more(1), nroff(1), ul(1)
colcrt(1)