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

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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:23:34+00:00 2026-05-29T06:23:34+00:00

Newish to shell scripting I’ve noticed that the syntax error report for an unexpected

  • 0

Newish to shell scripting I’ve noticed that the syntax error report for an unexpected token has the format

`unexpectedtoken' # ie backtick unexpected_token singlequote

What do the backtick and the single quote represent? They’re not present in the script itself.
They’re something to do with the shell, but what?

More specifically, I’m currently getting two error reports from the same line, which should be helping my debug attempts but I don’t know how to interpret them. The script has a param being passed to a function.

append2file \
"(common params for all samples; exemplar: ${monoArr2[@]:(-1)})" 

The first paren on the param line (line154) is the unexpected token. This also triggers a second error report.

./process_v7.sh: line 154: syntax error near unexpected token `('
./process_v7.sh: line 154: `        "(common params for all read_2 samples; exemplar: ${monoArr2[@]:(-1)})" \'

The spacing between the leading backtick and the start of that double-quoted string must be telling me something that will help my debugging, but what??? TIA

M

  • 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-29T06:23:35+00:00Added an answer on May 29, 2026 at 6:23 am

    The syntax for defining a function is:

    append2file() {
       # some code that references parameters via $1, $*, $@, etc
    }
    

    It sounds like you are putting something inside the (). Don’t do that.

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

Sidebar

Related Questions

When utilizing node.js's newish support for --eval , I get an error ( ReferenceError:
Probably a simple answer that's mock or stub related but I'm newish and trying
I am trying to write an MVC webpage that has two drop down lists.
Newish to Oracle programming (from Sybase and MS SQL Server). What is the Oracle
I'm newish to TFS and am working with VS and TFS 2010 RC releases.
Magento is a newish (past 5 years) PHP based Ecommerce system with an architecture
I am newish to MVC and understand all the great things about it, including
I'm newish to the python ecosystem, and have a question about module editing. I
I'm newish to Objective-C and my memory management skills are not great. However, I
I'm newish to NHibernate, and am attempting to wire up to a DB2 table

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.