Within a PHP environment I am trying to execute sift (a grep-like program) to return filenames if either of the two strings matches.
// To return filenames having either string1 OR string2.
<?php
$cmd='sift.exe -l --blocksize=5000000 -Q string1^|string2 dir';
exec ($cmd);
?>
I am guessing I am unable to pass the OR operator (^|
) correctly.
For matching a single string it works fine:
// To return filenames having string1
<?php
$cmd='sift.exe -l --blocksize=5000000 -Q string1 dir';
exec ($cmd);
?>
Any advice please?