linux强大的grep从配置文件中取出起作用的内容:
ghostwu@dev:~/linux/grep$ cat -n ghostwu.php
class Person {
#人名
public $name = 'ghostwu';
#年龄
public $age = 20;
#显示信息
public function showinfo(){
echo $this->name . PHP_EOL;
echo $this->age. PHP_EOL;
}
}
ghostwu@dev:~/linux/grep$ grep -Ev “^$|#” ghostwu.php
class Person {
public $name = 'ghostwu';
public $age = 20;
public function showinfo(){
echo $this->name . PHP_EOL;
echo $this->age. PHP_EOL;
}
}