Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1080833
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T22:05:22+00:00 2026-05-16T22:05:22+00:00

I have following string â â³ eGalax Inc. USB TouchController id=9 [slave pointer (2)]

  • 0

I have following string

â   â³ eGalax Inc. USB TouchController          id=9    [slave  pointer  (2)]
â   â³ eGalax Inc. USB TouchController          id=10   [slave  pointer  (2)]

and would like to get the list of id ? How this can be done using sed or something else ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T22:05:23+00:00Added an answer on May 16, 2026 at 10:05 pm

    I pasted the contents of your example into a file named so.txt.

    $ cat so.txt | awk '{ print $7 }' | cut -f2 -d"="
    9
    10
    

    Explanation:

    1. cat so.txt will print the contents of the file to stdout.
    2. awk '{ print $7 }' will print the seventh column, i.e. the one containing id=n
    3. cut -f2 -d"=" will cut the output of step #2 using = as the delimiter and get the second column (-f2)

    If you’d rather get id= also, then:

    $ cat so.txt | awk '{ print $7 }' 
    id=9
    id=10
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following string: \\\\AAA.AA.A.AA\\d$\\ivr\\vm\\2012May\\29\\10231_1723221348.vox I would like it to look like: \\AAA.AA.A.AA\d$\ivr\vm\2012May\29\10231_1723221348.vox
I have the following string : str = {application.root.category.id:2} I would like to convert
I have the following string ListId={1CC88B01-E60F-45D1-8B3C-28852574156D}&ID={0}&ContentTypeID=0x01003D458D19EF31D845B3A7727B0F2F8FC8 I would like to use it as such
I have the following string in ruby. string = 'filename.jpg' How can I get
I have the following string and I would like to remove <bpt *>*</bpt> and
I have the following string, which matches the following RegEx string. I would like
I have the following: string test = 9586-202-10072 How would I get all characters
Let's say I have following string: string test = False; I can't loop the
Have the following string i need to split. $string = This is string sample
I have following code: string date = 13.04.2012; string date2 = (DateTime.Parse(date).AddDays(1)).ToString(); This is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.