Posted On January 22, 2021

Linux: GREP Training

kimconnect 0 comments
blog.KimConnect.com >> Codes , Linux >> Linux: GREP Training

Lorum Ipsum – let’s learn about grep, ya’ll

Examples:

# Get information only on the VGA device
vgaDevice=$(lspci|grep VGA) # find the VGA device line
vgaDeviceId=$(echo "$vgaDevice" | grep -Eo '^[^ ]+') # select only the first word of a line
lspci -vs $vgaDeviceId # display PCI device by its ID

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Script to Send Emails

In the past, a simple email relay script was sufficient to spool internal messages. However,…

IIS Mime Types

One of the features of IIS security is to enforce file access by its associated…

Disable and Enable Trace Logging for Dynamics CRM

# Set common variables $serverTracingRegistry='Registry::HKEY_LOCAL_MACHINE\SOFTWARE\MICROSOFT\MSCRM' # Enable CRM Tracing Add-PSSnapin Microsoft.Crm.PowerShell $setting = Get-CrmSetting TraceSettings…