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
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
Something like this will work:
But where does
$READ_LINEcome from? What are you trying to accomplish? There might just also is a good plainshorkshsolution.I highly doubt your claim that
echo(which might be a shell builtin) takes more time thanawk. Here is aplain shversion:But the
kshsolution of Dennis Williamson looks the best for your situation.