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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T17:32:36+00:00 2026-06-16T17:32:36+00:00

As mentioned in several forums and here, on stackoverflow , there’s no difference between

  • 0

As mentioned in several forums and here, on stackoverflow, there’s no difference between these two ways of command substituion in shell.

But, there is. Here is a real example:

# this command works fine:
$(cat $LOG_FILE | gawk "(\$1 \$2) > $TIME")

# this one does not:
`cat $LOG_FILE | gawk "(\$1 \$2) > $TIME"`
  • 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-16T17:32:38+00:00Added an answer on June 16, 2026 at 5:32 pm

    And the whole thing behind this is that when bash sees a first `, it tries to find another one, substituting all \$, \` and \\ on its way,

    which leads to replacing \$1 with $1, and then,

    when substituting everything inside a "...", $1 is no longer escaped and is treated as the first agrument in a shell script itself (which is an empty string in my case) instead of being passed as $1 to gawk as is.

    This is another reason for not using `...` in shell.

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

Sidebar

Related Questions

I'm currently experiencing the issue mentioned here (and several other places): Subsonic 3 Linq
As there several ways to exchange data in the form of strings over sockets,
The dsquery command line tool is mentioned in the solution to several questions about
I know there are several ways to deploy a .net windows client application: There's
I get the error mentioned here: C++ Templates Error: no matching function for call
I've got several large MFC applications here, and converting them into any other format
It has been mentioned in several sources that C++0x will include better language-level support
I've seen binary trees and binary searching mentioned in several books I've read lately,
I know, there are several posts with nearly the same question, but all the
I am playing around with making a Fibonacci Heap. (They are mentioned several times

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.