This works well on the sample given. But, the specification doesn't say that
- the two patterns follow in the next TWO consecutive lines
- the order of the patterns is given
Should the be more lines to the records, and should the patterns be reversed, try
It reads the entire record no matter how long it is, and then deletes it should both patterns show up in no matter what sequence.
Good morning,
I would like to find all files of a certain type and display their name as well as their modification date.
In order to do this, I would do the following:
find ./ -name *.csv | ????????
My question: what to put after the pipe instead of the question marks? Is there a basic... (5 Replies)
Hi,
I have a conf.file with the following values:
ef=78
b=40
ca=40
c=45/dev2
when I modify one of the line with the below awk script,it's modifying BUT it's placing the modified line in the last line :
input:- Configure b 45/dev4
output:-
ef=78
ca=40
... (2 Replies)
I need help modifying the code below.
DATAFILE is a log file.
I have two strings i need to search for in the log file.
The two strings are:
1. ERROR
2. com.rolander.promotions.client
awk 'BEGIN {
while((getline < "'${SFILE}'")>0)
S
FS="\n"; RS="\n"
} (11 Replies)
I want the below script to omit every chunk of data that contains a specific hostname.
here's the scenario. i have a configuration file that contains the configuration of several hosts. a sample of this configuration file is this:
define host {
address ... (12 Replies)
so i have this data in a file:
jime=1860,yime=1.23243,lime=
jime=1859,yime=1.23018,lime=
jime=1825,yime=1.15371,lime=
jime=1849,yime=1.20769,lime=
jime=1841,yime=1.1897,lime=
jime=1849,yime=1.20769,lime=
i use this code to calculate the percentage difference of the number in column 2... (9 Replies)
Hello,
I am using awk command to print some output, but there are some characters that I would like to remove from the output
awk '{print $5$6}'
the output I get is
column5/:column6
I am looking forward to remove the : and to get the output
column5/column6
Sorry if this question is... (4 Replies)
Hi,
I have to modify the 2nd and 3rd octet of the IP address through awk/sed.
For Example:
Given IP is : 10.205.22.254, it should be modified as 10.105.100.254 through awk/sed.
Kindly help me on this and let me know if you have any questions.
Thanks in advances. (2 Replies)
below is a snippet of code from a larger perl code:
my $uname = ( -e '/usr/bin/uname' ) ? '/usr/bin/uname' : '/bin/uname';
my $os = ( `$uname 2>/dev/null` );
when i run this code, it seems to be complaining about the backticks. is there any efficient way i can get rid of the backticks... (3 Replies)
Hello folks;
I'm using the following command to get the highest number of requests per second in a log file and it works well.
grep "2017-02-22" "LogFile.log" | cut -c1-20 | uniq -c | sort -n | tail -n1
Now i would like to also get the smallest requests per second and the amount of time... (5 Replies)
Discussion started by: Katkota
5 Replies
LEARN ABOUT PHP
phpinfo
PHPINFO(3) 1 PHPINFO(3)phpinfo - Outputs information about PHP's configurationSYNOPSIS
bool phpinfo ([int $what = INFO_ALL])
DESCRIPTION
Outputs a large amount of information about the current state of PHP. This includes information about PHP compilation options and exten-
sions, the PHP version, server information and environment (if compiled as a module), the PHP environment, OS version information, paths,
master and local values of configuration options, HTTP headers, and the PHP License.
Because every system is setup differently, phpinfo(3) is commonly used to check configuration settings and for available predefined vari-
ables on a given system.
phpinfo(3) is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.
PARAMETERS
o $what
- The output may be customized by passing one or more of the following constants bitwise values summed together in the optional
$what parameter. One can also combine the respective constants or bitwise values together with the or operator.
phpinfo(3) options
+-------------------+--------------------------------------+---+
| Name (constant) | | |
| | | |
| | Value | |
| | | |
| | Description | |
| | | |
+-------------------+--------------------------------------+---+
| INFO_GENERAL | | |
| | | |
| | 1 | |
| | | |
| | The configuration line, php.ini | |
| | location, build date, Web Server, | |
| | System and more. | |
| | | |
| INFO_CREDITS | | |
| | | |
| | 2 | |
| | | |
| | PHP Credits. See also phpcred- | |
| | its(3). | |
| | | |
|INFO_CONFIGURATION | | |
| | | |
| | 4 | |
| | | |
| | Current Local and Master values for | |
| | PHP directives. See also ini_get(3). | |
| | | |
| INFO_MODULES | | |
| | | |
| | 8 | |
| | | |
| | Loaded modules and their respective | |
| | settings. See also get_loaded_exten- | |
| | sions(3). | |
| | | |
| INFO_ENVIRONMENT | | |
| | | |
| | 16 | |
| | | |
| | Environment Variable information | |
| | that's also available in $_ENV. | |
| | | |
| INFO_VARIABLES | | |
| | | |
| | 32 | |
| | | |
| | Shows all predefined variables | |
| | from EGPCS (Environment, GET, POST, | |
| | Cookie, Server). | |
| | | |
| INFO_LICENSE | | |
| | | |
| | 64 | |
| | | |
| | PHP License information. See also | |
| | the license FAQ. | |
| | | |
| INFO_ALL | | |
| | | |
| | -1 | |
| | | |
| | Shows all of the above. | |
| | | |
+-------------------+--------------------------------------+---+
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.5.0 | |
| | |
| | Logo GUIDs were replaced with data URIs, and so |
| | turning off expose_php now has no effect on the |
| | result of phpinfo(). Credits are also now embed- |
| | ded within the output itself instead of linked. |
| | |
| 5.2.2 | |
| | |
| | The "Loaded Configuration File" information was |
| | added, when before only "Configuration File |
| | (php.ini) Path" existed. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
phpinfo(3) Example
<?php
// Show all information, defaults to INFO_ALL
phpinfo();
// Show just the module information.
// phpinfo(8) yields identical results.
phpinfo(INFO_MODULES);
?>
NOTES
Note
In versions of PHP before 5.5, parts of the information displayed are disabled when the expose_php configuration setting is set to
off. This includes the PHP and Zend logos, and the credits.
Note
phpinfo(3) outputs plain text instead of HTML when using the CLI mode.
SEE ALSO phpversion(3), phpcredits(3), php_logo_guid(3), ini_get(3), ini_set(3), get_loaded_extensions(3), Predefined Variables.
PHP Documentation Group PHPINFO(3)