linux - Grep two words followed by a alphabetic character -


How can I make both "HD" and "SD" after any alphabetical character in an order?

Example: * = Alphabetical characters

  dmesg | Grep hd * dmesg | Grep sd *  

using the -E option For grep :

  dmesg | Grep -E 'HD * | Sd * ' 

For your specific example, you do not even need to type the -E option:

  Dmesg | Grep '[HS] D *'  

will suffice.


Comments

Popular posts from this blog

c# - Reactive Extensions ControlScheduler -

multithreading - Reorderings in java memory model -

java - Add color code support to a Bukkit plugin -