使用此命令find $FOAM_TUTORIALS -type f -name fvSchemes|xargs grep -rh div\(phi,U\)|sort
,我得到:
div(div(phi,U)) Gauss linear;
div(div(phi,U)) Gauss linear;
div(div(phi,U)) Gauss linear;
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linearUpwind grad;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind unlimited;
div(phi,U) bounded Gauss linearUpwind unlimited;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss localBlended linearUpwindV grad(U) linear;
div(phi,U) bounded Gauss LUST grad(U);
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) bounded Gauss upwind;
div(phi,U) Gauss CoBlended
div(phi,U) Gauss cubic;
div(phi,U) Gauss cubic;
div(phi,U) Gauss DEShybrid
div(phi,U) Gauss DEShybrid
div(phi,U) Gauss limitedLinear 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
div(phi,U) Gauss linear;
// div(phi,U) Gauss linear;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST grad(U);
// div(phi,U) Gauss LUST grad(U);// linear;
div(phi,U) Gauss LUST unlimitedGrad(U);
div(phi,U) Gauss skewCorrected linear;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
// div(phi,U) Gauss upwind;
div(phi,U) Gauss upwind;//linearUpwind grad(U);
div(phi,U) Gauss vanLeerV;
我希望冗余行只显示一次,如下所示:
div(phi,U) bounded Gauss limitedLinear 0.2;
div(phi,U) bounded Gauss limitedLinearV 1;
div(phi,U) bounded Gauss linear;
div(phi,U) bounded Gauss linearUpwind grad;
div(phi,U) bounded Gauss linearUpwind grad(U);
div(phi,U) bounded Gauss linearUpwind gradUConv;
div(phi,U) bounded Gauss linearUpwind limited;
div(phi,U) bounded Gauss linearUpwind unlimited;
div(phi,U) bounded Gauss linearUpwindV grad(U);
div(phi,U) bounded Gauss localBlended linearUpwindV grad(U) linear;
div(phi,U) bounded Gauss LUST grad(U);
div(phi,U) bounded Gauss upwind;
div(phi,U) Gauss CoBlended 0.01 limitedLinearV 1 0.05 linearUpwind grad(U);
div(phi,U) Gauss cubic;
div(phi,U) Gauss DEShybrid linear linearUpwind grad(U) hmax 0.65 1 0.028 0 1 1;
div(phi,U) Gauss DEShybrid linear linearUpwind grad(U) hmax 0.65 1 1 0 1 1;
div(phi,U) Gauss limitedLinear 1;
"div\(phi.*,U.*\)" Gauss limitedLinearV 1;
div(phi,U) Gauss limitedLinearV 1;
div(phi,U) Gauss linear;
div(phi,U) Gauss linearUpwind grad(U);
div(phi,U) Gauss linearUpwind limited;
div(phi,U) Gauss linearUpwindV grad(U);
div(phi,U) Gauss LUST grad(U);
div(phi,U) Gauss LUST unlimitedGrad(U);
div(phi,U) Gauss skewCorrected linear;
"div\(phi.*,U.*\)" Gauss upwind;
div(phi,U) Gauss upwind;
div(phi,U) Gauss vanLeerV;
假设您的输入位于名为
inputfile.txt
.你可以运行:
sed -e 's/ \+/ /g' inputfile.txt | grep -v "\/\/" | sort -u
解释:
sed -e 's/ \+/ /g' inputfile.txt
将多次出现的空白替换为一个空白。通过这种方式,执行最终的排序/比较更简单grep -v "\/\/"
删除注释行sort -u
删除重复的行。如果您不关心用一个空格替换多个空格,则此解决方案效果很好。
这些命令可以通过这种方式合并到您的原始命令中:
find $FOAM_TUTORIALS -type f -name fvSchemes | xargs grep -rh div\(phi,U\) | sed -e 's/ \+/ /g' | grep -v "\/\/" | sort -u