检索Z:\ZendFramework-1.11.9目录中所有混用Tab键和空格的.php文件:
zhanhailiang@www:~/public_html/ZendFramework-1.11.9> find . -name "*.php" -print|xargs grep -P "\t"|more
./demos/Zend/Cloud/cloudexp/application/Bootstrap.php: protected function _initConfig()
./demos/Zend/Cloud/cloudexp/application/Bootstrap.php: {
./demos/Zend/Cloud/cloudexp/application/Bootstrap.php: return new Zend_Config($this->getOptions());
./demos/Zend/Cloud/cloudexp/application/Bootstrap.php: }
./demos/Zend/Cloud/cloudexp/application/Bootstrap.php:
./demos/Zend/Cloud/cloudexp/application/Bootstrap.php: protected function _initResourceInjector()
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $request = $this->getRequest();
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $this->view->fieldcount = 5;
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $this->view->collections = $this->_doc->listCollections();
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $request = $this->getRequest();
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $fields[$field["name"]] = $field["value"];
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: return;
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $this->_doc->insertDocument($name, $document);
./demos/Zend/Cloud/cloudexp/application/controllers/DocumentController.php: $request = $this->getRequest();
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: $request = $this->getRequest();
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: if (!$name) {
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: $request = $this->getRequest();
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: if (!$name) {
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: $texts[] = $msg->getBody();
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: // remove messages from the queue
./demos/Zend/Cloud/cloudexp/application/controllers/QueueController.php: $this->_queue->deleteMessage($name, $msg);
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: Zend_Cloud_StorageService_Adapter_S3::FETCH_STREAM =>
true,
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: Zend_Cloud_StorageService_Adapter_WindowsAzure::RETUR
N_TYPE => Zend_Cloud_StorageService_Adapter_WindowsAzure::RETURN_STREAM
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: $request = $this->getRequest();
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: if (!$request->isPost()) {
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: return;
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: }
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: $name = $this->_getParam('name', false);
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php:
./demos/Zend/Cloud/cloudexp/application/controllers/StorageController.php: $upload = new Zend_File_Transfer();
--More--
接下来统计匹配行数:
zhanhailiang@www:~/public_html/ZendFramework-1.11.9> find . -name "*.php" -print|xargs grep -P "\t"|wc -l
5406
以上功能也可以通过editplus来完成:
菜单栏->搜索->在文件中查找功能:
其中
查找: \t
文件类型: *.php
排除:
文件夹:Z:\ZendFramework-1.11.9
同时勾选“正则表达式”和“包含子文件夹”两个选项
——学海无涯,自在分享!