Find the answer to your Linux question:
Results 1 to 3 of 3
I am running the lspci command and getting the list of pci devices.. I want to extract the manufacturer name getting printed between : and . what command can i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2005
    Posts
    24

    extracting information


    I am running the lspci command and getting the list of pci devices.. I want to extract the manufacturer name getting printed between : and .
    what command can i use to extract the same

  2. #2
    Linux Newbie
    Join Date
    Jul 2005
    Location
    ~/home
    Posts
    105
    Something like this??
    Code:
    lspci | awk '{print $1}' | cut -d ":" -f2,3  | cut -d "." -f1
    A example of the wanted output would be nice
    Help me getting a Opera licence
    Beginning with debian? -> read THIS!

  3. #3
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Or, in 2 commands
    Code:
    lspci | sed 's/.*: \([^.]*\.\).*/\1/'

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •