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

  • SEARCH
  • Home
  • 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 8129969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T08:30:46+00:00 2026-06-06T08:30:46+00:00

Say my input file is tab delimited, how do i identify if $0 contains

  • 0

Say my input file is tab delimited, how do i identify if $0 contains a word “hello” and it needs to be case insensitive?

here is a hello       whateverColumn2
nonono nonono         whateverItIs
here HeLLo again      mockColumn2

Thanks a lot!

  • 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-06-06T08:30:47+00:00Added an answer on June 6, 2026 at 8:30 am

    Given your lines in file data.txt:

    awk -F"\t" '/hello/ {print $0}' data.txt
    

    will print

    here is a hello       whateverColumn2
    here hello again      mockColumn2
    

    The -F"\t" sets tab as the field separator for the input lines.

    Update (based on request in comments below by OP):

    To make this case-insensitive use the IGNORECASE flag:

    awk -F"\t" 'BEGIN{IGNORECASE=1} /hello/ {print $0}' data.txt
    

    Note that the IGNORECASE variable is a GNU extension and may not be available in other versions of AWK.

    Alternatively, an example using match. In order to make this case-insensitive, the input is converted into lower case:

    awk -F"\t" '{if (match(tolower($0), "hello")) print $0}' data.txt
    

    Since match can take regular expressions, the conversion to lowercase may not be necessary with the right regular expression.

    Tested with GNU Awk 3.1.6 under Linux

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Let's say for example I have this code: <input type=file id=file name=> <input class=uploadarea>
Let's say I have an input text file of the following format: Section1 Heading
How do I read multiple lines (in Java) from an input file (say, helloworld.in)?
I've got an input to a batch file that contains a list of files
Lets say the input file is: Hi my name NONE Hi my name is
Say I have an input file, and a target directory. How do I determine
Let's say we have this code: <form action='' method='POST' enctype='multipart/form-data'> <input type='file' name='userFile'><br> <input
Lets say that input from the user is a decimal number, ex. 5. 2155
If I am creating say a input field through MXML , I can set
if a user types in an input say 3 into a text box three

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.