Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extracting 22-character strings from text using sed/awk? Post 302853609 by Twinklefingers on Sunday 15th of September 2013 01:36:33 PM
Old 09-15-2013
@bartus11 - Added in the post, thanks!

@RudiC - There are going to be more than one instances of GG in each line, however I can prepare the files for analysis by inserting a line break after each instances of GG.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

extracting a set of strings from a text file

i have textfiles that contain a series of lines that look like this: string0 .................................................... column3a column4a string1**384y0439 ..................................... column3b column4b... (2 Replies)
Discussion started by: Deanne
2 Replies

2. Shell Programming and Scripting

Extracting text between two strings, first instance only

There are a lot of ways to extract text from between two strings, but what if those strings occur multiple times and you only want the text from the first two strings? I can't seem to find anything to work here. I'm using sed to process the text after it's extracted, so I prefer a sed answer, but... (4 Replies)
Discussion started by: fubaya
4 Replies

3. UNIX for Dummies Questions & Answers

Using awk/sed to extract text between Strings

Dear Unix Gurus, I've got a data file with a few hundred lines (see truncated sample)... BEGIN_SCAN1 TASK_NAME=LA48 PDD Profiles PROGRAM=ArrayScan 1.00 21.220E+00 2.00 21.280E+00 END_DATA END_SCAN1 BEGIN_SCAN2 TASK_NAME=LA48 PDD Profiles 194.00 2.1870E+00 ... (5 Replies)
Discussion started by: tintin72
5 Replies

4. UNIX for Advanced & Expert Users

bash/grep/awk/sed: How to extract every appearance of text between two specific strings

I have a text wich looks like this: clid=2 cid=6 client_database_id=35 client_nickname=Peter client_type=0|clid=3 cid=22 client_database_id=57 client_nickname=Paul client_type=0|clid=5 cid=22 client_database_id=7 client_nickname=Mary client_type=0|clid=6 cid=22 client_database_id=6... (3 Replies)
Discussion started by: Pioneer1976
3 Replies

5. Shell Programming and Scripting

replace two character strings by two variables with sed command

Hello, I want to writte a script that replace two character strings by two variables with the command sed butmy solution doesn't work. I'm written this: sed "s/TTFactivevent/$TTFav/g && s/switchSLL/$SLL/g" templatefile. I want to replace TTFactivevent by the variable $TTFav, that is a... (4 Replies)
Discussion started by: POPO10
4 Replies

6. Shell Programming and Scripting

Extracting text between two strings

Hi, I've looked at a few existing posts on this, but they don't seem to work for my inputs. I have a text file where I want to extract all the text between two strings, every time that occurs. Eg my input file is Anna said that she would fetch the bucket. Anna and Ben moved the bucket.... (9 Replies)
Discussion started by: JamesForeman
9 Replies

7. Shell Programming and Scripting

any savant ? using AWK/SED to remove newline character between two strings : conditional removal

I'd like to remove (do a pattern or precise replacement - this I can handle in SED using Regex ) ---AFTER THE 1ST Occurrence ( i.e. on the 2nd occurrence - from the 2nd to fourth occurance ) of a specific string : type 1 -- After the 1st occurrence of 1 string1 till the 1st occurrence of... (4 Replies)
Discussion started by: sieger007
4 Replies

8. Shell Programming and Scripting

Extracting text between two constant strings

Hi All, I have a file whose common patter is like this: .I 1 .U 87049087 .S Some text here too .M This is a text .T Some another text here .P Name of the book .W Some lines of more text. This text needs to be extracted. .A more text goes here too .I 2 (2 Replies)
Discussion started by: shoaibjameel123
2 Replies

9. Shell Programming and Scripting

Extracting text between two strings, multiple instances

Hi experts, Ive got a text file which has the following text which will occur in this format at least one time: +=========================>> Some stuff that evreryone should knnow other stufsjdokajkajokajda aijhjajcdjajcisajcqsqdqwdqad <<=========================+ It is likely that... (8 Replies)
Discussion started by: martin0852
8 Replies

10. UNIX for Beginners Questions & Answers

Extracting strings at various positions of text file

Hi Team - I hope everyone has been well! I export a file from one of our source systems that gives me more information than I need. The way the file outputs, I need to extract certain strings at different positions on the file and echo them to another file. I can do this in batch easily,... (2 Replies)
Discussion started by: SIMMS7400
2 Replies
mh-mail(4)						     Kernel Interfaces Manual							mh-mail(4)

NAME
mh-mail - Message format for the MH message system DESCRIPTION
MH processes messages in a particular format. Although neither Bell nor Berkeley mailers produce message files in the format that MH prefers, MH can read message files in that format. Each user has a maildrop that initially receives all messages processed by the post command (see post(8)). The inc command reads from the maildrop and incorporates the new messages found there into the user's own +inbox folder. The maildrop con- sists of one or more messages. Messages are expected to consist of lines of text. Graphics and binary data are not handled. No data compression is accepted. All text is in ASCII 7-bit data. The general memo framework of RFC 822 is used. A message consists of a block of information in a rigid format, followed by general text with no specified format. The rigidly-formatted first part of a message is called the message header; the free-format portion is called the body. The header must always exist, but the body is optional. These parts are separated by a blank line or by a line of dashes. The following example shows the standard default MH mail header: To: cc: Subject: -------- The header is composed of one or more header items. Each header item can be viewed as a single logical line of ASCII characters. If the text of a header item extends across several real lines, the continuation lines are indicated by leading spaces or tabs. Each header item is called a component and is composed of a keyword or name, along with associated text. The keyword begins at the left margin, and is terminated by a colon (:). It cannot contain spaces or tabs, and cannot exceed 63 characters, as specified by RFC 822. The text for most formatted components, such as Date: and Message-Id:, is produced automatically. The user enters address fields such as To: and cc:, and the Subject: field. Internet addresses are assigned mailbox names and host computer specifications. The general format is local@domain, for example, MH@UCI or MH@UCI-ICSA.ARPA. A comma (,) separates multiple addresses. A missing host/domain is assumed to be the local host/domain. A blank line (or a line of dashes) signals that all following text up to the end of the file is the body of the message. No formatting is expected or enforced within the body. The following is a list of header components that are considered meaningful to MH programs: Added by post, contains the date and time of the message's entry into the transport system. Added by post, contains the address of the author or authors (there may be more than one if a Sender: field is present). Replies are typically directed to addresses in the Reply-To: or From: field. The former has precedence, if present. Added by post in the event that the message already has a From: line. This line contains the address of the actual sender. Replies are never sent to addresses in the Sender: field. Contains addresses of primary recipients. Contains addresses of secondary recipients. Contains the addresses of recipients who receive blind carbon copies of the message. The Bcc: line does not appear on the message as sent, so these recipients are not listed. Recipients in the Bcc: field receive a copy of the message with a minimal header. MH uses an encapsulation method for blind copies; see send(1). Causes post to copy the message into the specified folder for the sender, if the message was successfully given to the transport system. A unique message identifier added by post, if the -msgid flag is set. Sender's commentary. It is displayed by scan. A commentary line added by repl when replying to a message. Added by post when a message is redistributed. Added by post when a message is redistributed. New recipients for a message resent by dist. New secondary recipients for a message resent by dist. New blind carbon copy recipients for a message resent by dist. Places a copy of a message resent by dist into the sender's folder. A unique identifier of a message resent by dist. This is appended by post if the -msgid flag is set. Annota- tion added by dist when the -annotate flag is specified. Annotation added by forw when the -annotate flag is specified. Annotation added by repl when the -annotate flag is specified. Specifies the MIME version number. This header entry is used or added by MH software only when codeset conversion of mail messages is enabled and requested. For more information on codeset conversion, see the section on interna- tionalization features in mh(1). Specifies the content type, which is always TEXT/PLAIN, plus a charset value that names a coded character set (codeset). This header entry is used or added by MH software only when codeset conversion of mail messages is enabled and requested. For more information on codeset conversion, see the section on internationalization features in mh(1). FILES
Standard location of mail drop RELATED INFORMATION
Standard for the Format of ARPA Internet Text Messages (RFC 822) delim off mh-mail(4)
All times are GMT -4. The time now is 03:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy