How to search 2 separate patterns from a 2nd file.?
Hi Guys,
Need your urgent support please. I have a file with 3 separate strings separated by a comma and 2nd file which has a sentence where I can find these 3 strings. I need to find sentences which do not have these strings and maybe redirect it to a 3rd file.
All the 3 strings will occur in a single string and may contain 3 or more characters between them.
1st file
2nd file
Hope I have been able to explain it clearly.
Last edited by Scrutinizer; 05-29-2014 at 05:11 AM..
Reason: QUOTE tags change to CODE tags
I have one file:
123*100*abcd*10
123*101*abcd*-29*def
123*100*abcd*-10
123*102*abcd*-105*asd
I would like to parameterize the search patterns in the following way so that the user could dynamically change the search pattern.
*100* and *- (ie *minus)
*102* and *-
The output that is... (6 Replies)
Good day, great gurus,
I'm new to Perl, and programming in general. I'm trying to retrieve a column of data from my text file which spans a non-specific number of lines. So I did a regexp that will pick out the columns. However,my pattern would vary. I tried using a foreach loop unsuccessfully.... (2 Replies)
Hi Gurus,
I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
Hello guys
I am sure that you will help me on this issue as you did earlier::)
Scenario :
I have a folder named "XYZ". It consist many sub-folders and subfolder contain severals files. there may be abc.dat in each subfolder. Now i want to seperate subfolders on follwing conditions-
if abc.dat... (12 Replies)
Hi everyone,
I am trying to retrieve certain log from a big file. The log size can be from 200 - 600 lines. I have 3 search patterns, out of which 2 (first and last lines) search patterns are common for all the transactions but 3rd search pattern (occurs in the middle of transaction) is... (5 Replies)
hello
i have two files
temp.txt
and temp_unique.text
the second file consists the unique fields from the temp.txt file
the strings stored are in the following form
4,4
17,12
15,65
4,4
14,41
15,65
65,89
1254,1298i'm able to run the following script to get the total count of a... (3 Replies)
Hi,
I am new to shell scripting and is working on a script to extract lines from a log file between two time stamps using awk command. After some research I used following command:
awk '/01 Oct 2011/{p=1} /10 Oct 2011/{p=0} p' test.log >> tmp.log
This works fine. But now i want to... (3 Replies)
Hi all !
I have 2 files:
file1:
1|AAA|123456
2|BBB|098765432
...
file2:
-|klk|AAA|$123.00|Qty.2|US
-|opi|EEE|$23.00|Qty.4|US
...
Output:
1|AAA|-|klk|AAA|$123.00|Qty.2|US
I would need to search the 3rd field of file2 for the patterns contained in the 2nd field of file1.
And... (10 Replies)
I would like to grep for aaa and bbb and ccc from one line in file1.txt in any order on a line on file2.txt
file1.txt
aaa bbb ccc
ddd fff ggg
hhh ddd jjj
jjj cccfile2.txt
aaa bbb ccc ddd fff ggg --> output whole line since it matches with aaa bbb ccc of file1.txt
aaa ddd jjj hhh --> no... (1 Reply)
Discussion started by: sdf
1 Replies
LEARN ABOUT OSF1
telecode
telecode(5) File Formats Manual telecode(5)NAME
telecode - A character encoding system (codeset) for Traditional Chinese
DESCRIPTION
The Telecode codeset (called Mitac Telex in early versions of the operating system) consists of 2 character planes. Each character plane
has 8836 character positions. In plane 1, standard characters occupy positions 0001 to 8045; the remaining 791 positions are for user-
defined characters. In plane 2, standard characters occupy positions 0001 to 8489; the remaining 346 positions are for user-defined charac-
ters. Telecode uses 2-byte values to represent characters on both planes.
Plane 1 Character Encoding
To differentiate plane 1 code from plane 2 code, the most significant bit (MSB) is set on in both bytes of a plane 1 character code. The
following formula calculates the value of a plane 1 character from its position on the plane:
1st byte = M + 161
2nd byte = N + 161 - M x 94
In this formula, N is the position of the character and M = N / 94.
For example, if a character is at position 2502 on plane 1, its encoding value is BBDB, which is calculated as follows:
N = 2502, M = 2502/94 = 26 1st byte = 26 + 161 = 187 2nd byte = 2502 + 161 - 26 x 94 = 219
Plane 2 Character Encoding
To differentiate plane 2 code from plane 1 code, the MSB of the first byte is set on and that of the second byte is set off for each plane
2 character code. The following formula calculates the value of a plane 2 character from its position:
1st byte = M + 161
2nd byte = N + 33 - M x 94
In this formula, N is the position of the character on the plane and M = N / 94.
For example, if a character is at position 2502 on plane 2, its encoding value is BB5B, which is calculated as follows:
N = 2502, M = 2502/94 = 26 1st byte = 26 + 161 = 187 2nd byte = 2502 + 33 - 26 x 94 = 91
Codeset Conversion
The following codeset converter pairs are available for converting Traditional Chinese characters between telecode and other encoding for-
mats. Refer to iconv_intro(5) for an introduction to codeset conversion. For more information about the other codeset for which telecode
is the input or output, see the reference page specified in the list item. big5_telecode, telecode_big5
Converting from and to the Big-5 codeset: big5(5).
Note that Big-5 encoding is equivalent to the Microsoft code-page format used on PCs for Traditional Chinese. You can therefore use
these converters to convert Traditional Chinese characters between PC code page format and Telecode encoding format. For more infor-
mation on how the operating system supports PC code pages, see code_page(5). dechanyu_telecode, telecode_dechanyu
Converting from and to the DEC Hanyu codeset: dechanyu(5). eucTW_telecode, telecode_eucTW
Converting from and to Taiwanese Extended UNIX Code: eucTW(5).
Font Support for Telecode
The operating system supports Telecode only through conversion to another codeset.
SEE ALSO
Commands: locale(1)
Others: ascii(5), big5(5), Chinese(5), code_page(5), dechanyu(5), dechanzi(5), eucTW(5), GBK(5), i18n_intro(5), i18n_printing(5),
iconv_intro(5), l10n_intro(5), sbig5(5)telecode(5)