Help with allocated text content based on specific rules...
Input file format:
Desired output file:
If the first line of the content are not start as "/tag" or "/note". I would like those content allocated at the end of the content at "/note" based on the following rules:
1. If the last content at the "/note" is end with "-", the content (first line are not start as "/tag" or "/note") should straight append to it.
eg.
2. If the last content at the "/note" is excluded with "-", the content (first line are not start as "/tag" or "/note") should add a space " " before append to it.
eg.
Any programming language (awk, sed ,perl ,etc) are appreciate.
Thanks first for advice
Hello,
I'm new here but I found many of your posts very helpful.
I hope you can help me out here.
I'm trying to compare two files, but the catch here is to determine if the values are less or greater than the other column.
here is an example.
file1:
1 91625106 91626002
1 ... (19 Replies)
Hi,
I am having trouble converting a text file. I have been working for this whole day now, still i couldn't make it.
Here is how the text file looks:
_______________________________________________________
DEVICE STATUS INFORMATION FOR LOCATION 1:
OPER STATES: Disabled E:Enabled ... (5 Replies)
I regularly extract lines of text from files based on the presence of a particular keyword; I place the extracted lines into another text file. This takes about 2 hours to complete using the "sort" command then Kate's find & highlight facility.
I've been reading the forum & googling and can find... (4 Replies)
Hi,
I have the following text file:
8 T1mapping_flip02 ok 128 108 30 1 665000-000008-000001.dcm
9 T1mapping_flip05 ok 128 108 30 1 665000-000009-000001.dcm
10 T1mapping_flip10 ok 128 108 30 1 665000-000010-000001.dcm
11 T1mapping_flip15 ok 128 108 30... (2 Replies)
I now have a 230,000+ lines long text file formatted in segments like this:
Is there a way to sort this file to have everything in chronological order, based on the date and time in the text? In this example, I would like the result to be: (19 Replies)
Hello everyone,
I work under Ubuntu 11.10 (c-shell)
I need a script to create a new text file whose content is the text of another text files that are in the directory $DIRMAIL at this moment.
I will show you an example:
- On the one hand, there is a directory $DIRMAIL where there are... (1 Reply)
Hi,
I have a tab delimited text file from which I want to cut out specific columns. If the second column equals one, I want to cut out columns 1 and 5 and 6. If the second column equals two, I want to cut out columns 1 and 5 and 7. How do I go about doing that? Thanks! (4 Replies)
Input file
2 5 ASFGEWTEWRQWEQ
10 20 QEWIORUEIOUEWORUQWEQWRQRQWGQWGFQ
1 6 WRQTQWTQTQWTQT
Desired output file
2 5 ASFGEWTEWRQWEQ
10 20 QEWIORUEIOUEWORUQWEQWRQRQWGQWGFQ
1 6 WRQTQWTQTQWTQT
Column 1 is the start region of underline the text in column 3;
Column 2 is the end region of... (13 Replies)
Hi My requirement is very simple .
I juts need to delte some lines from a file.
here comes theactual scenario
I have some data in file like say
srinivasa prabhu kumar antony
srinivas king prabhu antony
srinivas prabhu king yar venkata
venkata kingson srinivas... (6 Replies)
In the perl below, which does execute, I am having trouble with the else in Rule 3. The digit in f{8} is extracted and used to update f accordinly along with the value in f.
There can be either - * or + before the number that is extracted but the same logic applies, that is if the value is greater... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT PHP
ps_add_note
PS_ADD_NOTE(3) 1 PS_ADD_NOTE(3)ps_add_note - Adds note to current pageSYNOPSIS
bool ps_add_note (resource $psdoc, float $llx, float $lly, float $urx, float $ury, string $contents, string $title, string $icon,
int $open)
DESCRIPTION
Adds a note at a certain position on the page. Notes are like little rectangular sheets with text on it, which can be placed anywhere on a
page. They are shown either folded or unfolded. If folded, the specified icon is used as a placeholder.
The note will not be visible if the document is printed or viewed but it will show up if the document is converted to pdf by either Acrobat
Distillertm or Ghostview.
PARAMETERS
o $psdoc
- Resource identifier of the postscript file as returned by ps_new(3).
o $llx
- The x-coordinate of the lower left corner.
o $lly
- The y-coordinate of the lower left corner.
o $urx
- The x-coordinate of the upper right corner.
o $ury
- The y-coordinate of the upper right corner.
o $contents
- The text of the note.
o $title
- The title of the note as displayed in the header of the note.
o $icon
- The icon shown if the note is folded. This parameter can be set to comment, insert, note, paragraph, newparagraph, key, or help.
o $open
- If $open is unequal to zero the note will be shown unfolded after opening the document with a pdf viewer.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
SEE ALSO ps_add_pdflink(3), ps_add_launchlink(3), ps_add_locallink(3), ps_add_weblink(3).
PHP Documentation Group PS_ADD_NOTE(3)