Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Insert a break page after certain string using SED Post 302579427 by newbeee on Tuesday 6th of December 2011 11:00:36 AM
Old 12-06-2011
Corona688:

sed.exe can be found at C:\Program Files (x86)\GnuWin32\bin
This is where I defined on SED_PATH and SED_PROGRAM is calling sed.exe. Is this wrong? If so, how should I define it?

What I want to do is whenever "Primary Ins." is founded, a new line will be inserted along with a #1.

Thanks for all your help and looking into this.

---------- Post updated 12-06-11 at 12:00 PM ---------- Previous update was 12-05-11 at 06:10 PM ----------

I figured out the sed part. However, what I'm trying to do is to put in a 1 AFTER anyline that has 'Primary Ins.'

This code below gives me the opposite. It puts in a 1 BEFORE the line that 'Primary Ins.' is found. Help please!

s/Primary Ins./1\
Primary Ins./g
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to insert line break + string in vi (search & replace )

Hello all i have big test file that has allot of structure text something like this : <foo1 *.html> <blah action> somthing 1 somthing 2 </blah> </foo1 > now i will like to insert 2 more lines of text below the <blah action> so it will be like : <foo1... (1 Reply)
Discussion started by: umen
1 Replies

2. UNIX for Dummies Questions & Answers

Can I use sed to insert a string which has colon

Hi, all, I wonder if I can use sed to insert a string which has a colon. I have a txt file a.txt like the following TRAIN/DR1/FCJF0/SI1027.MFC TRAIN/DR1/FCJF0/SI1657.MFC I want to insert a string C:/TIMIT/TIMIT at the begining of each line. I use the commond: TIM=C\:/TIMIT/TIMIT... (2 Replies)
Discussion started by: Jenny.palmy
2 Replies

3. Shell Programming and Scripting

Page Break with AWK or SED

Hello All, I am new to unix scripting, I have an urgent issue Is it possible to do a group by on the last column and then a page break on the text file. For example I have a text file, below is the example data STRT 2154081~VA ~23606 ~TM14~8506~1485 STRT 2130893~VA ~23602 ~TM15~8602~1586... (4 Replies)
Discussion started by: udaybo
4 Replies

4. Shell Programming and Scripting

help on page break

Hi, i have a file say samp.s which has 123 a b c d 123 e f g h 123 i j k l 123 m n o p 234 a b c d 234 e f g h 234 i j k l the first 3 characters in each line are considered the key values i have one more file temp.txt which has 123 234 i want to have a page break in... (5 Replies)
Discussion started by: Sheema
5 Replies

5. Shell Programming and Scripting

Insert line break

Dear All, thanks in advance input file 410530AAANNNNNAAA410530JJJJJJYYYY410530PPPPPAAAAAA........... I want output like 410530AAANNNNNAAA 410530JJJJJJYYYY 410530PPPPPAAAAAA Thanks (10 Replies)
Discussion started by: The_Archer
10 Replies

6. Shell Programming and Scripting

help - sed - insert space between string of form XxxAxxBcx, without replacing the pattern

If the string is of the pattern XxxXyzAbc... The expected out put from sed has to be Xxx Xyz Abc ... eg: if the string is QcfEfQfs, then the expected output is Qcf Ef Efs. If i try to substitute the pattern with space then the sed will replace the character or pattern with space,... (1 Reply)
Discussion started by: frozensmilz
1 Replies

7. Shell Programming and Scripting

Page Break in large file

Hi, The shell script inserting the millions of rows into target flat file system and handling the line number for each line. We need a page break line after every 10,000 lines. is there any command to insert a page break line into target file. (3 Replies)
Discussion started by: koti_rama
3 Replies

8. Shell Programming and Scripting

Page Break in a file for printing

Hi, We have 1lac records in source file and unix script will genarate around 1000 files. From target location the files are taking for printing on physical papers. the page size limitation : 256 Lines Can you please tell me how to insert the page break in a flat file for printer. (5 Replies)
Discussion started by: koti_rama
5 Replies

9. Shell Programming and Scripting

How to insert file contents after nth occurrence of a string using sed?

Hi, I would like to know how, using sed, be able to insert contents of file2 in file1 after say the second occurrence of a given string? e.g. > cat file1 banana apple orange apple banana pear tangerine apple > cat file2 I don't like apples What would be the sed command to insert... (5 Replies)
Discussion started by: dimocn
5 Replies

10. Shell Programming and Scripting

[sed]: syntax to insert N spaces in front of a string

Dear all, I would like to insert N blankspaces in front of a string using sed command To give an example (N=10), I tried that code: $ echo "abcd" | sed 's/^/ \{10,\}&/' but I failed, by obtaining that result: {10,}abcd Any help would be greatly appreciated, Thanks in advance,... (18 Replies)
Discussion started by: dae
18 Replies
IMAP_FETCHSTRUCTURE(3)							 1						    IMAP_FETCHSTRUCTURE(3)

imap_fetchstructure - Read the structure of a particular message

SYNOPSIS
object imap_fetchstructure (resource $imap_stream, int $msg_number, [int $options]) DESCRIPTION
Fetches all the structured information for a given message. PARAMETERS
o $ imap_stream -An IMAP stream returned by imap_open(3). o $msg_number - The message number o $options - This optional parameter only has a single option, FT_UID, which tells the function to treat the $msg_number argument as a UID. RETURN VALUES
Returns an object includes the envelope, internal date, size, flags and body structure along with a similar object for each mime attach- ment. The structure of the returned objects is as follows: Returned Objects for imap_fetchstructure(3) +--------------+---------------------------------------------------+ | type | | | | | | | Primary body type | | | | | encoding | | | | | | | Body transfer encoding | | | | | ifsubtype | | | | | | | | | | TRUE if there is a subtype string | | | | | subtype | | | | | | | MIME subtype | | | | |ifdescription | | | | | | | | | | TRUE if there is a description string | | | | | description | | | | | | | Content description string | | | | | ifid | | | | | | | | | | TRUE if there is an identification string | | | | | id | | | | | | | Identification string | | | | | lines | | | | | | | Number of lines | | | | | bytes | | | | | | | Number of bytes | | | | |ifdisposition | | | | | | | | | | TRUE if there is a disposition string | | | | | disposition | | | | | | | Disposition string | | | | |ifdparameters | | | | | | | | | | TRUE if the $dparameters array exists | | | | | dparameters | | | | | | | An array of objects where each object has an | | | "attribute" and a "value" property corresponding | | | to the parameters on the Content-dispositionMIME | | | header. | | | | |ifparameters | | | | | | | | | | TRUE if the parameters array exists | | | | | parameters | | | | | | | An array of objects where each object has an | | | "attribute" and a "value" property. | | | | | parts | | | | | | | An array of objects identical in structure to the | | | top-level object, each of which corresponds to a | | | MIME body part. | | | | +--------------+---------------------------------------------------+ Primary body type (may vary with used library) +--+-------------+ |0 | | | | | | | text | | | | |1 | | | | | | | multipart | | | | |2 | | | | | | | message | | | | |3 | | | | | | | application | | | | |4 | | | | | | | audio | | | | |5 | | | | | | | image | | | | |6 | | | | | | | video | | | | |7 | | | | | | | other | | | | +--+-------------+ Transfer encodings (may vary with used library) +--+------------------+ |0 | | | | | | | 7BIT | | | | |1 | | | | | | | 8BIT | | | | |2 | | | | | | | BINARY | | | | |3 | | | | | | | BASE64 | | | | |4 | | | | | | | QUOTED-PRINTABLE | | | | |5 | | | | | | | OTHER | | | | +--+------------------+ SEE ALSO
imap_fetchbody(3), imap_bodystruct(3). PHP Documentation Group IMAP_FETCHSTRUCTURE(3)
All times are GMT -4. The time now is 04:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy