hi all
i have directory
/usr
under this directory i have subdirectories
tmp1,tmp2,tmp3
like this
/usr/tmp1
/usr/tmp2
/usr/tmp3
and so on
i want to search string in files (i don't know the name of the files)and i want to serch it in all the directories under the /usr
how shell i do... (3 Replies)
I am doing "ps -f" to see my process.
but I get lines that one of it represents the ps command itself.
I want to grep it out using -v flag, but than I get another process that belongs to the GREP itself :
I would like to exclude
# ps -f
UID PID PPID C STIME TTY TIME CMD... (2 Replies)
i want to search in the current directory all the files that contain one word for example "hello"
i want to achieve it with the grep command but not with the grep * (2 Replies)
Hi, im taking an entry Unix class, and as part of my lab assignment I have to copy all files in the /home/david/lab3 directory that have the file extension .save to your lab3/temp directory. I'm having trouble getting the grep to do anything worth while
I've been trying to do:
cp... (6 Replies)
Hi,
I have around 500 Text files and Each file will be having either
String1 or String2.
I want to list the file only which has String1 and Sting2 in a single command.. (5 Replies)
Hi
I have lots of file in on folder and i want to egrep from only few files.
List of files......
Polt_KJ_430_OutputRBS_istUt_CR2.log
Polt_KN_4122_OutputRBS_ncChk_CR.log
Polt_LN_2230_OutputRNC_Hth_CLKLKL.log
Solt_KJ_430_OutputRBS_istUt_CR2.log
Solt_KN_4122_OutputRBS_ncChk_CR3.log... (2 Replies)
grep -i -f panel_genes.txt hg19_refGene.txt > match.txt
seems to be pulling names the do not exist in the input file (panel_genes.txt) - the output is attached as well (match.txt)
For example, RNF185 or ZNF146 are not genes in the input. I am trying to match the input file genes only and am... (9 Replies)
Hello,
I am running below command as root user
#nodetool cfstats tests | grep "Memtable switch count"
Memtable switch count: 12
Where as when I try to run same command as another user it gives different result.
#su -l zabbix -s /bin/bash -c "nodetool cfstats tests | grep "Memtable switch... (10 Replies)
for example i have a directory
home/solaris/unix/samplefiles/
with defaults files in it.. those default files have 1 word in common "UNIX". how can i list the files without "UNIX" words in it using grep command
thanks,
im using unix solaris, korn shell.. (1 Reply)
Discussion started by: daveaztig14
1 Replies
LEARN ABOUT PHP
exit
EXIT(3) 1 EXIT(3)exit - Output a message and terminate the current scriptSYNOPSIS
void exit ([string $status])
DESCRIPTION
void exit (int $status)
Terminates execution of the script. Shutdown functions and object destructors will always be executed even if exit is called.
exit is a language construct and it can be called without parentheses if no $status is passed.
PARAMETERS
o $status
- If $status is a string, this function prints the $status just before exiting. If $status is an integer, that value will be used
as the exit status and not printed. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and
shall not be used. The status 0 is used to terminate the program successfully.
Note
PHP >= 4.2.0 does NOT print the $status if it is an integer.
RETURN VALUES
No value is returned.
EXAMPLES
Example #1
exit example
<?php
$filename = '/path/to/data-file';
$file = fopen($filename, 'r')
or exit("unable to open file ($filename)");
?>
Example #2
exit status example
<?php
//exit program normally
exit;
exit();
exit(0);
//exit with an error code
exit(1);
exit(0376); //octal
?>
Example #3
Shutdown functions and destructors run regardless
<?php
class Foo
{
public function __destruct()
{
echo 'Destruct: ' . __METHOD__ . '()' . PHP_EOL;
}
}
function shutdown()
{
echo 'Shutdown: ' . __FUNCTION__ . '()' . PHP_EOL;
}
$foo = new Foo();
register_shutdown_function('shutdown');
exit();
echo 'This will not be output.';
?>
The above example will output:
Shutdown: shutdown()
Destruct: Foo::__destruct()
NOTES
Note
Because this is a language construct and not a function, it cannot be called using variable functions.
Note
This language construct is equivalent to die(3).
SEE ALSO register_shutdown_function(3).
PHP Documentation Group EXIT(3)