例如: 我想检查一下"服务器代理"存在于文件" aaa",
中那么我应该如何使用shell命令来实现呢?
聚苯乙烯。我认为命令require_once "scssphp-0.1.7/scss.inc.php";
use Leafo\ScssPhp\Compiler;
use Leafo\ScssPhp\Server;
$scss = new Compiler();
$scss->setImportPaths('sass');
//$txt = '$color: yellow;';
$txt = '$font: "Open sans";';
$txt .= '$body-font-size: 15px;';
$txt .= '$containerWidth: 1140px;';
$txt .= '$gutter-size: 15px;';
$txt .= '$primarycolor: red;';
$txt .= '$secondarycolor: blue;';
$txt .= '$background: #e8e3e3;';
$txt .= '$textcolor: $primarycolor;';
$txt .= '$linkcolor: #000;';
$file = fopen('sass/_configuratie.scss', "w");
if (fwrite($file, $txt)) {
$server = new Server('sass', null, $scss);
$server->serve();
}
可以为第二步提供一些帮助。
答案 0 :(得分:2)
grep -q "server proxy" aaa || echo "server proxy" >> aaa