Hi All,
I want to delete the contents of few files which are really huge in size.
How the same can be done by using sed. Is there any other alternative to sed.
Thanks in advance (10 Replies)
Every day a new .zip file is uploaded to a folder and at mid-night the zip file is to be extracted into a /data/ folder, inside a date-named folder.
# This should extract the contents of a zip file into the /data/ folder into a date based folder
/usr/bin/unzip -a -o... (15 Replies)
In our shop, we have a situation where a log file from our interface engine software has begun maxing out in file size (reaching the 32-bit "2147483647" limit). Currently, the only way to rectify this is to stop the interface and restart it, which generates a new log. Easy enough, but the... (6 Replies)
Hi,
I have a script which will use an input.txt file as an input file.
I am providing data to this input file in the script and once the script is executed, I want to clear all the contents of this file as during the second time use of this script, I'll be appending the data in this input... (5 Replies)
Hi guys,
How to write terminal contents into a file in Unix operating system
Actually I created GUI by using Gtk2-perl. I want to display data on GUI whatever the contents writing on terminal. So which command I have to use and where that command to be run I mean in shell script or Perl... (2 Replies)
Hi
How to completely delete directory with all it contents
I try to use rmdir -r but it give error
Thanks
---------- Post updated at 03:10 AM ---------- Previous update was at 02:52 AM ----------
Hi all
I got the solution for my thread
i use mkdir with the option -p
Thanks (1 Reply)
Hi,
I am trying to find out whether there are any Unix utilities that compares folders, files and contents within the file and provides a comprehensive report. The comparison can be against base version of a folder and file with content. Can you please let me know of such a utility?
Thanks,... (6 Replies)
Discussion started by: Sripathi_ks
6 Replies
LEARN ABOUT PHP
define
DEFINE(3) 1 DEFINE(3)define - Defines a named constantSYNOPSIS
bool define (string $name, mixed $value, [bool $case_insensitive = false])
DESCRIPTION
Defines a named constant at runtime.
PARAMETERS
o $name
- The name of the constant.
o $value
- The value of the constant; only scalar and null values are allowed. As of PHP 7 it also possible to use array value. Scalar val-
ues are integer, float, string or boolean values. It is possible to define resource constants, however it is not recommended and
may cause unpredictable behavior.
o $case_insensitive
- If set to TRUE, the constant will be defined case-insensitive. The default behavior is case-sensitive; i.e. CONSTANT and Con-
stant represent different values.
Note
Case-insensitive constants are stored as lower-case.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+---------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------+
| 7.0.0 | |
| | |
| | |
| | array values are allowed. |
| | |
+--------+---------------------------+
EXAMPLES
Example #1
Defining Constants
<?php
define("CONSTANT", "Hello world.");
echo CONSTANT; // outputs "Hello world."
echo Constant; // outputs "Constant" and issues a notice.
define("GREETING", "Hello you.", true);
echo GREETING; // outputs "Hello you."
echo Greeting; // outputs "Hello you."
// Works as of PHP 7
define('ANIMALS', array(
'dog',
'cat',
'bird'
));
echo ANIMALS[1]; // outputs "cat"
?>
SEE ALSO defined(3), constant(3), The section on Constants.
PHP Documentation Group DEFINE(3)