Advertisement
gsavix

grep on windows powershell

Aug 27th, 2014
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.87 KB | None | 0 0
  1. howto find contents inside files on windows 7 or windows 8
  2.  
  3. created by gsavix with notepad++
  4.  
  5. on windows7 or windows8 you could find contents of some type of files.
  6. For example for search all .php files for application weberp to see what of them have
  7. information about word "wiki" (and do not care about lower case or upper case) you run:
  8.  
  9. 1) on menu start run powershell that will start a window with powershell, something like a linux terminal;
  10.  
  11. 2) inside windows powershell run: ls | select-string wiki
  12.  
  13. this command will show all files that have string wiki lower or upper case.
  14. see that you will see file name and line number where string occurs.
  15.  
  16. See one real example for where weberp version 4.11.3 handle wiki.
  17.  
  18. for help with power shell use help ls
  19.  
  20. SelectCustomer.php:226: wikiLink('Cliente', $_SESSION['CustomerID']);
  21. SelectProduct.php:419:wikiLink('Produto', $StockID);
  22. SelectSupplier.php:177: wikiLink('Supplier', $_SESSION['SupplierID']);
  23. SystemParameters.php:237: if ($_SESSION['WikiApp'] != $_POST['X_WikiApp'] ) {
  24. SystemParameters.php:238: $sql[] = "UPDATE config SET confvalue = '". $_POST['X_WikiApp']."' WHERE confname = 'WikiApp'";
  25. SystemParameters.php:240: if ($_SESSION['WikiPath'] != $_POST['X_WikiPath'] ) {
  26. SystemParameters.php:241: $sql[] = "UPDATE config SET confvalue = '". $_POST['X_WikiPath']."' WHERE confname = 'WikiPath'";
  27. SystemParameters.php:901:$WikiApplications = array( _('Disabled'),
  28. SystemParameters.php:902: _('WackoWiki'),
  29. SystemParameters.php:903: _('MediaWiki'),
  30. SystemParameters.php:904: _('DokuWiki') );
  31. SystemParameters.php:906:echo '<tr style="outline: 1px solid"><td>' . _('Wiki application') . ':</td>
  32. SystemParameters.php:907: <td><select name="X_WikiApp">';
  33. SystemParameters.php:908:for ($i=0; $i < sizeof($WikiApplications); $i++ ) {
  34. SystemParameters.php:909: echo '<option '.($_SESSION['WikiApp'] == $WikiApplications[$i] ? 'selected="selected" ' : '').'value="'.$WikiApplications[$i].'">' . $WikiApplications[$i] . '</option>';
  35. SystemParameters.php:912: <td>' . _('This feature makes webERP show links to a free form company knowledge base using a wiki. This allows sharing of important company information - about customers, suppliers and products and the set up of work flow menus and/or company procedures documentation') . '</td></tr>';
  36. SystemParameters.php:914:echo '<tr style="outline: 1px solid"><td>' . _('Wiki Path') . ':</td>
  37. SystemParameters.php:915: <td><input type="text" name="X_WikiPath" size="40" maxlength="40" value="' . $_SESSION['WikiPath'] . '" /></td>
  38. SystemParameters.php:916: <td>' . _('The path to the wiki installation to form the basis of wiki URLs - or the full URL of the wiki.') . '</td></tr>';
  39. WorkOrderEntry.php:596: wikiLink('WorkOrder', $_POST['WO'] . $_POST['OutputItem' .$i]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement