I am new to linux and would like to modify the contents of a file preferably using a one line. The situation is as follows
<start>
some lines
"I am the string"
"replace string"
more lines here
<end>
In the above example,On encountering "I am the string", the "replace string "should be... (6 Replies)
I have to update a paramater (dateMemLimit) present in a file, with a date (YYYYMMDD) equal to 5 days before the sysdate. The parameter will be in the following format.
dateMemLimit = 20091201
Please note the blank spaces present between 'dateMemLimit' &'=' and between '='... (4 Replies)
Hello! I'm using sed to perform a lots of replaces in one text file. I call it this way:
sed -f commands.txt in.txt > out.txt
commands.txt has about 1000 lines, each one is some variation of:
s/from/to/gI
And in.txt has about 300 000 lines. So the problem is that operation takes about... (7 Replies)
I have a section of text in file A, see below
# falkdjf lkjadf lkjadf
lkajdf lkajdf lkajdf lkjadf
lkjadf 234.234.2.234
lkjlkjlk 234.234.3.234
#
Only the first line with "# falkdjf lkjadf lkjadf" is unique in the file. The new section that I want to overwrite the old section above is in... (1 Reply)
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
I have looked around and there are several examples of how to use sed, but I don't think any of them help me very much with what I am trying to do.
I have a text file like this....
1! SRCNAM = 00001 !
1! X = 50.0000, 0.0000,... (10 Replies)
Hi All,
I have a input file as sample below
<this is not starting of file>
record
line1
line2
line3
end
line4
line5
record
line6
line7
line8
my requirement is this, i want to select a pattern between first record and end, whatever is written between first record and end.
and... (0 Replies)
Hello all,
I'm trying to replace all possible combinations of specific character occurrences within a string with another character, that is:
For the following string:
ABCAACD
I want to replace all the possible combinations of the character 'A' with the character 'G', so the output... (3 Replies)
Hi,
I have php files in main dir and sub dir's as well.
I need to find "new mysqli('localhost', 'System', 'xxxxxx', 'System', '3306');"
and replace as "new mysqli('localhost', 'unx_sys', 'yyyy', 'unx_sys', '3306');"
I tried like:
sed 's/new mysqli\(*\)\;$/new... (1 Reply)
Hello everybody, I need your help.
I have a php site that was expoited, the hacker has injected into many php files a phishing code that was discovered and removed in order to have again a clean code. Now we need to remove from many php files that malware. I need to create a script that find and... (2 Replies)
Discussion started by: ninocap
2 Replies
LEARN ABOUT DEBIAN
sdl_setalpha
SDL_SetAlpha(3) SDL API Reference SDL_SetAlpha(3)NAME
SDL_SetAlpha - Adjust the alpha properties of a surface
SYNOPSIS
#include "SDL.h"
int SDL_SetAlpha(SDL_Surface *surface, Uint32 flag, Uint8 alpha);
DESCRIPTION
Note:
This function and the semantics of SDL alpha blending have changed since version 1.1.4. Up until version 1.1.5, an alpha value of 0
was considered opaque and a value of 255 was considered transparent. This has now been inverted: 0 (SDL_ALPHA_TRANSPARENT) is now
considered transparent and 255 (SDL_ALPHA_OPAQUE) is now considered opaque.
SDL_SetAlpha is used for setting the per-surface alpha value and/or enabling and disabling alpha blending.
Thesurface parameter specifies which surface whose alpha attributes you wish to adjust. flags is used to specify whether alpha blending
should be used (SDL_SRCALPHA) and whether the surface should use RLE acceleration for blitting (SDL_RLEACCEL). flags can be an OR'd combi-
nation of these two options, one of these options or 0. If SDL_SRCALPHA is not passed as a flag then all alpha information is ignored when
blitting the surface. The alpha parameter is the per-surface alpha value; a surface need not have an alpha channel to use per-surface alpha
and blitting can still be accelerated with SDL_RLEACCEL.
Note:
The per-surface alpha value of 128 is considered a special case and is optimised, so it's much faster than other per-surface values.
Alpha effects surface blitting in the following ways:
RGBA->RGB with SDL_SRCALPHA
The source is alpha-blended with the destination, using the alpha channel. SDL_SRCCOLORKEY and the per-surface alpha
are ignored.
RGBA->RGB without SDL_SRCALPHA
The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored.
RGB->RGBA with SDL_SRCALPHA
The source is alpha-blended with the destination using the per-surface alpha value. If SDL_SRCCOLORKEY is set, only the
pixels not matching the colorkey value are copied. The alpha channel of the copied pixels is set to opaque.
RGB->RGBA without SDL_SRCALPHA
The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque. If SDL_SRCCOLORKEY is
set, only the pixels not matching the colorkey value are copied.
RGBA->RGBA with SDL_SRCALPHA
The source is alpha-blended with the destination using the source alpha channel. The alpha channel in the destination
surface is left untouched. SDL_SRCCOLORKEY is ignored.
RGBA->RGBA without SDL_SRCALPHA
The RGBA data is copied to the destination surface. If SDL_SRCCOLORKEY is set, only the pixels not matching the col-
orkey value are copied.
RGB->RGB with SDL_SRCALPHA
The source is alpha-blended with the destination using the per-surface alpha value. If SDL_SRCCOLORKEY is set, only the
pixels not matching the colorkey value are copied.
RGB->RGB without SDL_SRCALPHA
The RGB data is copied from the source. If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are
copied.
Note:
Note that RGBA->RGBA blits (with SDL_SRCALPHA set) keep the alpha of the destination surface. This means that you cannot compose
two arbitrary RGBA surfaces this way and get the result you would expect from "overlaying" them; the destination alpha will work as
a mask.
Also note that per-pixel and per-surface alpha cannot be combined; the per-pixel alpha is always used if available
RETURN VALUE
This function returns 0, or -1 if there was an error.
SEE ALSO
SDL_MapRGBA, SDL_GetRGBA, SDL_DisplayFormatAlpha, SDL_BlitSurface
SDL Tue 11 Sep 2001, 23:01 SDL_SetAlpha(3)