Replace disable_functions in php.ini with value of your choice which may be different on different servers
================================================
-bash-2.05b# grep disable_functions /usr/local/lib/php.ini
disable_functions = 1 2 e weq t ret rye y etyhty rt et e
... (3 Replies)
Currently I am using the tr command in 3 scenarios for a ksh script.
1) Replacing any spaces in the file with a ~
tr ' ' '~' <$orignalFile> $newFile
2) After certain processing is done at the end of the scirpt i convert the Tilde back to spaces
tr ' ' '~' <$newFile> $newFile2
3) Last... (4 Replies)
I need to check for 4ht parameter values, if they are not in (17,18) in other words if they r not equal to 17 or 18 then exit.
can u help pls (4 Replies)
I want to replace string values from a file to a file
For eg : File1 has 30 lines of string with values, those specific values needs to be changed in file2 and remaining values in file2 should be as it is.
For example:
From file (File1)
cluster.name=secondaryCluster
To replace File... (9 Replies)
hi all ,
( perl)
i am trying to replace jst one column in a file for eg
month dayofweek dealar car-name
jan thurs mercedes c300
feb wed lexus is300
all this data is in a master file and i want to replace jan with 1
feb... (5 Replies)
Hi,
I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below...
if (start_new_rec=="true"){
exclude_user="false";
user=toupper($6);
match(user, "XXXXX.");
if (RSTART ==2 ) {
... (9 Replies)
Hello everyone,
i need to replace in the second column of my csv file, points by nothing and dash by comma like this:
Input:
1 2 1;12.111.312-2;1.2;2;1-3
2 1 1;11.212.331-1;3.3;1;2-2
Output:
1 2 1;12111312;2;1.2;2;1-3
2 1 1;11212331;1;3.3;1;2-2
SED or PERL commands preferably.
... (7 Replies)
please consider the following file, there are repeated blocks of m values, and nested s values within. there are 2 columns (cols 3 and 4)associated with each m,s combination. All s1 rows must get a value of a(col 3 in output), all s2 values must get a value of b(col 3 in output). If s1 and s2 rows... (1 Reply)
Hello All,
I am having the file as below .I need to replace column 9-12 with some other values. In the below file I need to replace 1509 to 1508 and 1508 to 1507 .Can you please help me in how to do that
Thanks,
Arun
... (10 Replies)
Good day guys,
I'm having trouble in creating a logic when it comes to replacing the values inside a file.
I tried using sed command but it just doesn't work the way I want it to be.
Here is what I'm trying to achieve.
If my input file contains the values below.
NAME++GUEST1 ++GUESS2++... (3 Replies)
Discussion started by: asdfghjkl
3 Replies
LEARN ABOUT PHP
wincache_ucache_cas
WINCACHE_UCACHE_CAS(3) 1 WINCACHE_UCACHE_CAS(3)wincache_ucache_cas - Compares the variable with old value and assigns new value to itSYNOPSIS
bool wincache_ucache_cas (string $key, int $old_value, int $new_value)
DESCRIPTION
Compares the variable associated with the $key with $old_value and if it matches then assigns the $new_value to it.
PARAMETERS
o $key
- The $key that is used to store the variable in the cache. $key is case sensitive.
o $old_value
- Old value of the variable pointed by $key in the user cache. The value should be of type long, otherwise the function returns
FALSE.
o $new_value
- New value which will get assigned to variable pointer by $key if a match is found. The value should be of type long, otherwise
the function returns FALSE.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Using wincache_ucache_cas(3)
<?php
wincache_ucache_set('counter', 2922);
var_dump(wincache_ucache_cas('counter', 2922, 1));
var_dump(wincache_ucache_get('counter'));
?>
The above example will output:
bool(true)
int(1)SEE ALSO wincache_ucache_inc(3), wincache_ucache_dec(3).
PHP Documentation Group WINCACHE_UCACHE_CAS(3)