Hai all
i want to grep the particular pattern and move the mathing records to torget file and delete the matching recodrs from source file.
patterns are position based, like
13413432,aaaaaaa,dsfdddddd,34234324,22224555
13413432,aaaaaaa,dsfdddddd,12234324,11222455
i want to move the... (1 Reply)
I have a big file with "|" delimiter. I want to delete all the records that have 'abc' in the 2nd field. How can i do that? I am not abe to open it in VI that is why i need to do it from outside. Please suggest (6 Replies)
Hai
I have a flat file which contains more than 6 crore lines or records. I want to delete only one line, using line number. For example I want to delete 414556 th line . How to do this using sed or awk command.
thanks (3 Replies)
I have a file which has about 10000 records and I need to delete about 50 records from the file. I know line numbers and am using
sed '134,1357,......d' filename > new file.
It does not seem to be working.
Please Advice (5 Replies)
Hi Friends,
I have the following file,
cat input
chr1 1000 2000
chr1 600 699
chr1 701 1000
chr1 600 1710
chr2 900 1800
Now, I would like to see the difference of
Record1.Col2 - Record2.Col2
Record1.Col2 - Record2.Col3
Record1.Col3 - Record2.Col2
Record1.Col3 - Record2.Col3
... (1 Reply)
Hi,
Can any one help me...
the records are not deleting when I run the below script.
But if I issue the same delete command manually, the records are getting deleted.
script:
#!/bin/ksh
USAGE_STRING="USAGE $0 "
if
then
echo "SORRY you need to be user 'mqm'. Only 'mqm' has... (5 Replies)
How do i delete the records when we have string "abcd" at position 21 to 24. The file is huge in size. Any help is appreciated.
Sample data given below
eiojfcdf oijjfdm ijdabcd234vffmv
eojfirr jfdiopem ijaabb456irkmd
aodniiuielc uejdocvoabcd957wpdjf (4 Replies)
Hello Mates,
I would request your help in a shell script,
simply I need to delete some matching db table records (rows) to ones in a given file:
------------------------------
#!/bin/bash
SQL="delete from numberlist where msidn='';"
MYSQL_USER="<your-user>"... (4 Replies)
i have a requirement to delete records that do not belong to that day. For example in a file that came on July 31st ,2018 there are records that belong to Aug 1st,2018 as well and I want to find and delete those records. I want to delete anything with 01-Aug-2018. I have several files like that. I... (6 Replies)
Discussion started by: Priya
6 Replies
LEARN ABOUT PHP
ini_get
INI_GET(3) 1 INI_GET(3)ini_get - Gets the value of a configuration optionSYNOPSIS
string ini_get (string $varname)
DESCRIPTION
Returns the value of the configuration option on success.
PARAMETERS
o $varname
- The configuration option name.
RETURN VALUES
Returns the value of the configuration option as a string on success, or an empty string for null values. Returns FALSE if the configura-
tion option doesn't exist.
EXAMPLES
Example #1
A few ini_get(3) examples
<?php
/*
Our php.ini contains the following settings:
display_errors = On
register_globals = Off
post_max_size = 8M
*/
echo 'display_errors = ' . ini_get('display_errors') . "
";
echo 'register_globals = ' . ini_get('register_globals') . "
";
echo 'post_max_size = ' . ini_get('post_max_size') . "
";
echo 'post_max_size+1 = ' . (ini_get('post_max_size')+1) . "
";
echo 'post_max_size in bytes = ' . return_bytes(ini_get('post_max_size'));
function return_bytes($val) {
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
switch($last) {
// The 'G' modifier is available since PHP 5.1.0
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}
?>
The above example will output something similar to:
display_errors = 1
register_globals = 0
post_max_size = 8M
post_max_size+1 = 9
post_max_size in bytes = 8388608
NOTES
Note
When querying boolean values
A boolean ini value of off will be returned as an empty string or "0" while a boolean ini value of on will be returned as "1". The
function can also return the literal string of INI value.
Note
When querying memory size values
Many ini memory size values, such as upload_max_filesize, are stored in the php.ini file in shorthand notation. ini_get(3) will
return the exact string stored in the php.ini file and NOT its integer equivalent. Attempting normal arithmetic functions on these
values will not have otherwise expected results. The example above shows one way to convert shorthand notation into bytes, much like
how the PHP source does it.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.0 | |
| | |
| | Previously, the empty string was returned if the |
| | configuration option didn't exist. now, FALSE is |
| | returned instead. |
| | |
+--------+---------------------------------------------------+
SEE ALSO get_cfg_var(3), ini_get_all(3), ini_restore(3), ini_set(3).
PHP Documentation Group INI_GET(3)