BCFile次の内容があるとします。
inlet
{
type fixedValue;
value uniform (5 0 0);
}
outlet
{
type inletOutlet;
inletValue $internalField;
value $internalField;
}
....
blahblahblah (other boundary condition with the same dictionary format as above)
outlet境界条件のタイプ、つまり を出力inletOutletするには、
cat BCFile | grep "type" | awk '{printf $2}' | tr -d ";"
しかし、今の問題は、grep非常に多くのtypeキーワードが表示されていることです。最初に単語を検出しoutlet、次にその内容を検索してgrepする方法はあり{}ますか? ありがとう!