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

CentOS System Setup

Notes from 2018...   # Upgrade system and clean disk yum upgrade yum clean all…

Installing Simple NFS GUI (for Ubuntu / Mint / Debian)

Overview: Simple NFS GUI is a Linux application that automates the whole NFS share configuration…

Quick & Useful Snippet to Set SSL TLS Protocol of PowerShell

$requiredTls='Tls12' $availableSslProtocols=[enum]::getnames([net.securityprotocoltype]) if([Net.ServicePointManager]::SecurityProtocol -notin $requiredTls -and $requiredTls -in $availableSslProtocols){ [Net.ServicePointManager]::SecurityProtocol=[Net.SecurityProtocolType]::$requiredTls }