Chubler, thank you for your time on this- My script has evolved, and I was hoping I could re-phrase my question.
Example snippet:
Text file:
How can I replace <!HTMLPLACE> with the snippet and retain all formatting? Like So:
All of my awk and sed solutions get tripped up by special characters and new lines. Thanks!
I have a file names 'log.txt' that looks something like this:
#This is a comment
/sbin/iptables -A INPUT -p tcp -s ip.of.a machine --destination-port 21 -j ACCEPT
#This is the comment to read#
/sbin/iptables -A INPUT -p tcp -s ip.of.a.machine --destination-port 21 -j ACCEPT
I would like... (1 Reply)
I'm attempting to insert multiple lines before a line matching a given search pattern. These lines are generated in a separate function and can either be piped in as stdout or read from a temporary file.
I've been able to insert the lines from a file after the pattern using:
sed -i '/pattern/... (2 Replies)
Hi,
I am trying to get lines between the last occurrences of two patterns. I have files that have several occurrences of “Standard” and “Visual”. I will like to get the lines between “Standard” and “Visual” but I only want to retain only the last one e.g.
Standard
Some words
Some words
Some... (4 Replies)
Hello,
I can extract lines in a file, between two strings but only one time.
If there are multiple occurencies, my command show only one block.
Example, monfichier.txt contains :
debut_sect
texte L1
texte L2
texte L3
texte L4
fin_sect
donnees inutiles 1
donnees inutiles 2
... (8 Replies)
Hi
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
Something like
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Greetings All,
I would like to find all occurences of a pattern and delete a substring from the all matching lines EXCEPT the first. For example:
1234::group:user1,user2,user3,blah1,blah2,blah3
2222::othergroup:user9,user8
4444::othergroup2:user3,blah,blah,user1
1234::group3:user5,user1
... (11 Replies)
Experts Good day,
I want to filter multiple lines of same error of same day , to only 1 error of each day, the first line from the log.
Here is the file:
May 26 11:29:19 cmihpx02 vmunix: NFS write failed for server cmiauxe1: error 5 (RPC: Timed out)
May 26 11:29:19 cmihpx02 vmunix: NFS... (4 Replies)
hi..
i have a fasta file with the following format
>sequence1
CCGGTTTTCGATTTGGTTTGACT
>sequence2
AAAGTGCCGCCAGGTTTTGAGTGT
>sequence3
AGTGCCGCAGAGTTTGTAGTGT
Now, i want to read alternate line and add "GGGGGGGGGGG" to end of every sequence
Desired output:
>sequence1... (4 Replies)
Hi,
I am running the following:
PASS="username/password"
sqlplus -s << EOF | grep -v "^$"
$PASS
set feedback off
set heading off
set termout off
select name from v\$database ;
exit
EOF
Which gives
ERROR:
ORA-28002: the password will expire within 5 days
PSMP1 (1 Reply)
Discussion started by: newbie_01
1 Replies
LEARN ABOUT PHP
imageflip
IMAGEFLIP(3) 1 IMAGEFLIP(3)imageflip - Flips an image using a given modeSYNOPSIS
bool imageflip (resource $image, int $mode)
DESCRIPTION
Flips the $image image using the given $mode.
PARAMETERS
o $
image -An image resource, returned by one of the image creation functions, such as imagecreatetruecolor(3).
o $mode
- Flip mode, this can be one of the IMG_FLIP_* constants:
+--------------------+---------------------------------------------------+
| Constant | |
| | |
| | Meaning |
| | |
+--------------------+---------------------------------------------------+
| | |
|IMG_FLIP_HORIZONTAL | |
| | |
| | Flips the image horizontally. |
| | |
| | |
| IMG_FLIP_VERTICAL | |
| | |
| | Flips the image vertically. |
| | |
| | |
| IMG_FLIP_BOTH | |
| | |
| | Flips the image both horizontally and verti- |
| | cally. |
| | |
+--------------------+---------------------------------------------------+
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Flips an image vertically
This example uses the IMG_FLIP_VERTICAL constant.
<?php
// File
$filename = 'phplogo.png';
// Content type
header('Content-type: image/png');
// Load
$im = imagecreatefrompng($filename);
// Flip it vertically
imageflip($im, IMG_FLIP_VERTICAL);
// Output
imagejpeg($im);
imagedestroy($im);
?>
The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example: Vertically flipped image
Example #2
Flips the image horizontally
This example uses the IMG_FLIP_HORIZONTAL constant.
<?php
// File
$filename = 'phplogo.png';
// Content type
header('Content-type: image/png');
// Load
$im = imagecreatefrompng($filename);
// Flip it horizontally
imageflip($im, IMG_FLIP_HORIZONTAL);
// Output
imagejpeg($im);
imagedestroy($im);
?>
The above example will output something similar to:[NOT DISPLAYABLE MEDIA]Output of example: Horizontally flipped image
NOTES
Note
This function is only available if PHP is compiled with the bundled version of the GD library.
PHP Documentation Group IMAGEFLIP(3)