フィルタにはファイルに大文字が必要です(すべて大文字ではありません)。

フィルタにはファイルに大文字が必要です(すべて大文字ではありません)。

私はこのファイルの出力をしたいだけです。

AVDDPLL1V8
AGNDPLL1V8
DVDDPLL1V1
DGNDPLL1V1 

これは私の入力です。

6.1.2 Power and Ground Pins
             The following table describes the power and ground pins for the PLL.


             Table 5: Power and Ground Pins
                  Pin Name                                                Description
                                    Analog power pin. This pin provides the power supply for the sensitive analog
                AVDDPLL1V8
                                    blocks of the PLL.
                                    Analog ground pin. This pin provides the ground for the sensitive analog blocks
                AGNDPLL1V8
                                    of the PLL.
                                    Digital power pin. This pin provides power supply for the digital circuits in the
                DVDDPLL1V1
                                    PLL.
                DGNDPLL1V1          Digital ground pin. This pin provides ground for the digital circuits in the PLL.

ベストアンサー1

1つの方法は次のとおりです。

$ awk '$1 ~ /^[[:upper:]]+[0-9]+/ {print $1}' file
AVDDPLL1V8
AGNDPLL1V8
DVDDPLL1V1
DGNDPLL1V1

説明する

^各行の最初のフィールドのみを確​​認し、1つ以上の大文字で始まり、[[:upper:]]+その後に1つ以上の数字が続くと[0-9]+印刷します。

あなたの入力によると、大文字の後に1つ以上の数字があるとします。

おすすめ記事