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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:15:42+00:00 2026-06-07T15:15:42+00:00

Scenario: I am trying out a small shell scripting program. In this program- I

  • 0

Scenario:
I am trying out a small shell scripting program.

In this program- I am trying to query a database with 2 tables. and trying to get a yes or no answer.

The etag = md5sum that I fetch from the file using a python script.

echo 'select a.hash,b.hashuser, case when a.hash=b.hashuser then "No!" else "yes!" end from tempo b, hashes a where a.hash=b.hashuser and b.hashuser='$etag''

When I try to print it on my screen it shows it clearly that etag as the md5sum

But, If I try to query it on my database and try to fetch the result. using the script given below

sqlite3 hashez.db 'select a.hash,b.hashuser, case when a.hash=b.hashuser then "No!" else "yes!" end from tempo b, hashes a where a.hash=b.hashuser and b.hashuser='$etag''

This is the error that I get.

 Error: unrecognized token: "579f0b61cf958a0eea2f60906e6a04a4"

After googling a little bit, this the solution I found from this link

Then I changed it to ${#etag}

echo 'select a.hash,b.hashuser, case when a.hash=b.hashuser then "No!" else "yes!" end from tempo b, hashes a where a.hash=b.hashuser and b.hashuser='${#etag}''

The error that I get now is

select a.hash,b.hashuser, case when a.hash=b.hashuser then "No!" else "yes!" end from tempo b, hashes a where a.hash=b.hashuser and **b.hashuser=32**

Why is b.hashuser=32. is my first question.

Second problem:

When I try to query the database using the above function:

sqlite3 hashez.db 'select a.hash,b.hashuser, case when a.hash=b.hashuser then "No!" else "yes!" end from tempo b, hashes a where a.hash=b.hashuser and b.hashuser='${#etag}''

I got no reply back.

  • Is my query wrong. , If yes, why am I getting an answer when I query it directly on the database?

Sorry for my bad english

  • 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-07T15:15:44+00:00Added an answer on June 7, 2026 at 3:15 pm

    You’re goofing on your quotes.

    somecmd 'SELECT ... "'"$etag"'", ...'
    

    Note the double quotes inside the single quotes, as well as around the parameter substitution.

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

Sidebar

Related Questions

I'm trying to implement this scenario using Unity and i can't figure out how
I am trying to work out on this scenario and just curious if it's
I'm trying to work out what hosting to get for a small pop up
this is the scenario i'm trying to achieve: a sound stored on the same
I'm trying to design for the following scenario but cannot get my head around
Trying to figure out how to best handle the following scenario: Assume a RequestContext
I'm trying to figure out two things: Can Xpath be used to query a
Consider this scenario. I have a small enterprise project dev environment. We use archiva
I am trying to solve a small problem with ko mapping. The scenario is
I am a newbie trying out SSH. The scenario is I have 2 machines

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.