09-03-2019
shogun1970
Apart from showing us your attempts at this problem, could you also indicate if the order of records in the output file is important?
The problem description seems to indicate that a direct match record, when available, should be listed first and then other matches should be displayed in the same order as they appear in file1.txt.
However if the order of records in the output file is unimportant, the solution can be simplified a fair bit.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a text file and I want to clean up the file by only print those lines start with the date. Is there anyway I can do that?
Thanks
CT (1 Reply)
Discussion started by: CamTu
1 Replies
2. Shell Programming and Scripting
Hi,
Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11
Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
6 Replies
3. Shell Programming and Scripting
I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it.
For example, Here is a portion of a zone file.
IN NS ns1.domain.tld.
IN NS ns2.domain.tld.
IN ... (2 Replies)
Discussion started by: cdn_humbucker
2 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Discussion started by: evelibertine
1 Replies
5. Shell Programming and Scripting
I have 2 TXT files with with 8 columns in them(tab separated). First file has 2000 entries whereas 2nd file has 300 entries.
The first file has ALL the lines of second file. Now I need to remove those 300 lines (which are in both files) from first file so that first file's line count become... (2 Replies)
Discussion started by: prvnrk
2 Replies
6. Shell Programming and Scripting
I dont even have a sample script cause I dont know where to start from. My data lookes like this
> sat#16 #data: 15 site:UNZA baseline: 205.9151
0.008 -165.2465 35.8109 40.6685 21.9148 121.1446 26.4629 -18.4976 33.8722
0.017 -165.2243 48.2201 40.6908 ... (8 Replies)
Discussion started by: malandisa
8 Replies
7. Shell Programming and Scripting
I'm trying to pull an image source url from a html source file. I'm new with regex. I'm in BaSH. I've tried grep -E 'http.*jpg' file which highlights the text, but gives me 2 problems:
1) Results aren't stand alone and can't be piped to another command. (I believe it includes everything in... (5 Replies)
Discussion started by: amx401
5 Replies
8. Shell Programming and Scripting
I hope this makes sense and is possible.
I am trying to match $1 of panel_genes.txt with $3 of RefSeqGene.txt and when a match is found the value in $6 of RefSeqGene.txt
Example: ACTA2 is $1 of panel_genes.txt
ACTA2 NM_001613.2
ACTA2 NM_001141945.1
awk 'FNR==NR {... (4 Replies)
Discussion started by: cmccabe
4 Replies
9. Shell Programming and Scripting
I am trying to remove each line in which $2 is FP or RFP. I believe the below will remove one instance but not both. Thank you :).
file
12
123 FP
11
10 RFP
awk
awk -F'\t' '
$2 != "FP"' file
desired output
12
11 (6 Replies)
Discussion started by: cmccabe
6 Replies
10. Shell Programming and Scripting
In the below file I am trying to grep or similar, all lines where only AF= is less than 0.4.. Thank you :).
grep
grep "AF=" ,+ .4 file
file
12 112036782 . T C 34.0248 PASS ... (3 Replies)
Discussion started by: cmccabe
3 Replies
TRSP(8c) TRSP(8c)
NAME
trsp - transliterate sequenced packet protocol trace
SYNOPSIS
trsp [ -a ] [ -s ] [ -t ] [ -j ] [ -p hex-address ] [ system [ core ] ]
DESCRIPTION
Trpt interrogates the buffer of SPP trace records created when a socket is marked for "debugging" (see setsockopt(2)), and prints a read-
able description of these records. When no options are supplied, trsp prints all the trace records found in the system grouped according
to SPP connection protocol control block (PCB). The following options may be used to alter this behavior.
-s in addition to the normal output, print a detailed description of the packet sequencing information,
-t in addition to the normal output, print the values for all timers at each point in the trace,
-j just give a list of the protocol control block addresses for which there are trace records,
-p show only trace records associated with the protocol control block who's address follows,
-a in addition to the normal output, print the values of the source and destination addresses for each packet recorded.
The recommended use of trsp is as follows. Isolate the problem and enable debugging on the socket(s) involved in the connection. Find the
address of the protocol control blocks associated with the sockets using the -A option to netstat(1). Then run trsp with the -p option,
supplying the associated protocol control block addresses. If there are many sockets using the debugging option, the -j option may be use-
ful in checking to see if any trace records are present for the socket in question.
If debugging is being performed on a system or core file other than the default, the last two arguments may be used to supplant the
defaults.
FILES
/vmunix
/dev/kmem
SEE ALSO
setsockopt(2), netstat(1)
DIAGNOSTICS
``no namelist'' when the system image doesn't contain the proper symbols to find the trace buffer; others which should be self explanatory.
BUGS
Should also print the data for each input or output, but this is not saved in the race record.
The output format is inscrutable and should be described here.
4.2 Berkeley Distribution October 8, 1985 TRSP(8c)