I'm trying to move files based on a certain day..my question is on array's, what's wrong with the way I'm stepping through the array? what i have gives me syntax errors..any ideas...so far I have
#! /bin/bash
sun_d=`cal |grep -v |awk '{printf " " $1}' `
echo "$sun_d"
ls -l... (1 Reply)
Hi,
I wish to store $string1 in $string1array a character in each array element.
Then i wish to echo the entire array to the screen so that it reads as the normal string again.
I have been trying with the code below but does not work. Please help...
To put string into array:
... (5 Replies)
I am facing a strange error while creating posix threads:
Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output.
Snippet 1
This works:
--------------
int *threadids;
threadids = (int *) malloc (num_threads * sizeof(int));
... (4 Replies)
Hi All,
I'm writing a nagios check that will see if our ldap servers are in sync...
I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable
so...eg...let take the single array... (1 Reply)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi
I want to write a script which store all the parameters passed to the script into an array.
Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD.
I want to know how can I... (3 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
sorry I am new to the bash scripting since I was used to c shell programming. I am writting a script in bash for which I have to create an array in bash. I was able to do parse one variable through command line by doing": Lets say the below code is part of temp.bash and is called like:
temp.bash... (5 Replies)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
LEARN ABOUT PHP
ini_get_all
INI_GET_ALL(3) 1 INI_GET_ALL(3)ini_get_all - Gets all configuration optionsSYNOPSIS
array ini_get_all ([string $extension], [bool $details = true])
DESCRIPTION
Returns all the registered configuration options.
PARAMETERS
o $extension
- An optional extension name. If set, the function return only options specific for that extension.
o $details
- Retrieve details settings or only the current value for each setting. Default is TRUE (retrieve details).
RETURN VALUES
Returns an associative array with directive name as the array key.
When $details is TRUE (default) the array will contain global_value (set in php.ini), local_value (perhaps set with ini_set(3) or .htac-
cess), and access (the access level).
When $details is FALSE the value will be the current value of the option.
See the manual section for information on what access levels mean.
Note
It's possible for a directive to have multiple access levels, which is why access shows the appropriate bitmask values.
CHANGELOG
+--------+------------------+
|Version | |
| | |
| | Description |
| | |
+--------+------------------+
| 5.3.0 | |
| | |
| | Added $details. |
| | |
+--------+------------------+
EXAMPLES
Example #1
ini_get_all(3) examples
<?php
print_r(ini_get_all("pcre"));
print_r(ini_get_all());
?>
The above example will output something similar to:
Array
(
[pcre.backtrack_limit] => Array
(
[global_value] => 100000
[local_value] => 100000
[access] => 7
)
[pcre.recursion_limit] => Array
(
[global_value] => 100000
[local_value] => 100000
[access] => 7
)
)
Array
(
[allow_call_time_pass_reference] => Array
(
[global_value] => 0
[local_value] => 0
[access] => 6
)
[allow_url_fopen] => Array
(
[global_value] => 1
[local_value] => 1
[access] => 4
)
...
)
Example #2
Disabling $details
<?php
print_r(ini_get_all("pcre", false)); // Added in PHP 5.3.0
print_r(ini_get_all(null, false)); // Added in PHP 5.3.0
?>
The above example will output something similar to:
Array
(
[pcre.backtrack_limit] => 100000
[pcre.recursion_limit] => 100000
)
Array
(
[allow_call_time_pass_reference] => 0
[allow_url_fopen] => 1
...
)
SEE ALSO
"How to change configuration settings", ini_get(3), ini_restore(3), ini_set(3), get_loaded_extensions(3), phpinfo(3), ReflectionExten-
sion::getINIEntries.
PHP Documentation Group INI_GET_ALL(3)