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 1047869
In Process

The Archive Base Latest Questions

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

from my ksh I have [[ ` echo $READ_LINE | awk ‘{print $2}’ `

  • 0

from my ksh I have

  [[  ` echo $READ_LINE | awk '{print $2}' ` != SOME_WORD  ]] && print "not match"

can I get suggestion how to verify the same without echo command? ( maybe awk/sed is fine for this? )

lidia

  • 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-16T16:22:07+00:00Added an answer on May 16, 2026 at 4:22 pm

    Something like this will work:

    awk -v x="$READ_LINE" -v y="SOME_WORD" 'BEGIN { split(x, a); if (a[2] != y) print "not match";}'
    

    But where does $READ_LINE come from? What are you trying to accomplish? There might just also is a good plain sh or ksh solution.

    I highly doubt your claim that echo (which might be a shell builtin) takes more time than awk. Here is a plain sh version:

    set -- $READ_LINE
    [ x$2 != xSOME_WORD] && echo "not match" 
    

    But the ksh solution of Dennis Williamson looks the best for your situation.

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

Sidebar

Related Questions

I have example of the follwoing lines from print command (from ksh script) first_name=raimondelita
I have a script (KSH script to be precise) that downloads 3 files from
s#!/bin/ksh usrid=`sql_login.sh` if [ $? -ne 0 ]; then echo sql login failed-Username/Password not
Running the md5 function from the ksh terminal does not matching the output from
from my ksh script . echo $IP1 $ALIAS1 >> /etc/hosts echo $IP2 $ALAIS2 >>
From my website, I have a button which calls a method and then generates
From this context: import itertools lines = itertools.cycle(open('filename')) I'm wondering how I can implement
From the Scala API , I got the following example, which does not compile;
From 2.13.2/3 The double quote and the question mark ? , can be represented
find `pwd` -type f -name *.ksh -exec grep -H .ksh '{}' \; -print 2>/dev/null

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.