Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1088  / 2 Years ago, fri, june 24, 2022, 8:46:42

I need to cut line in specific moment, I want to display GPU name, but only name, nothing else.


inxi -Gx | grep Device showing:


Device-2: NVIDIA GK107GLM [Quadro K1100M] vendor: Dell driver: nouveau

I want it to show something like this


NVIDIA GK107GLM [Quadro K1100M]

How to cut this to show only name? Is there a way to print range, in this case from word Device to word vendor.


More From » grep

 Answers
1

Tryt to do it this way:


inxi -Gx | sed -n 's/.*Device-.*: (.*) vendor.*/1/p'

[#1321] Saturday, June 25, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
sipwing

Total Points: 245
Total Questions: 100
Total Answers: 118

Location: Aland Islands
Member since Thu, Oct 22, 2020
4 Years ago
sipwing questions
Sun, May 29, 22, 22:00, 2 Years ago
Fri, Dec 23, 22, 00:04, 1 Year ago
Tue, Aug 24, 21, 02:55, 3 Years ago
;