Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
いくつか質問があります:
1-ファイルtu.txtで、大文字のみを含むすべての単語を見つけるにはどうすればよいですか。たとえば、GFDY
2- 最初の文字だけが大文字である複数単語の用語を見つけるにはどうすればよいですか (例: Royal Kingdom castle)
私はgrepを使用することを好みます。
1) grep -w "[[:upper:]]\{1,\}" tu.txt
grep -w "[[:upper:]]\{1,\}" tu.txt
ここで、[:upper:]menas[A-Z]と{1,}は、[AZ]から少なくとも1つの記号を持つ単語を意味します。
[:upper:]
[A-Z]
{1,}
2)「用語」とはどういう意味ですか?あなたの論理を明確にしてください。