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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:44:15+00:00 2026-06-05T15:44:15+00:00

While attempting to debug a job submission script, I ended up narrowing down the

  • 0

While attempting to debug a job submission script, I ended up narrowing down the bug to this:

    [testuser@bes ~]$ var=( 1 foo1*bar4 echo 1*4=4 )
    [testuser@bes ~]$ echo "${var[@]}"
    1 foo1*bar4 echo 1*4=4
    [testuser@bes ~]$ cd /data/testuser/jobs/example/a16162/
    [testuser@bes a16162]$ var=( 1 foo1*bar4 echo 1*4=4 )
    [testuser@bes a16162]$ echo "${var[@]}"
    1 foo1-bar4 foo1*bar4 echo 1*4=4
    [testuser@bes a16162]$

That is an uncut transcript of a fresh bash session. Anyone have any idea how that one works? Is this some archaic feature of bash that I’ve never heard of before, or just a really weird bug?

Versions (yes I know it’s out dated):

GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

Linux bes 2.6.18-194.11.3.el5 #1 SMP Mon Aug 30 16:19:16 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

EDIT: This is for something that needs to process a user-passed array, and I’d rather use this method than a triplet of rather awkward awk hacks. They’re trivial “extract element 2” sorts of things, which is why using the array seems nicer.

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

    Globs are still globbed when the array is formed. If you don’t want this then you need to quote or escape them.

    $ var=( 1 "foo1*bar4" echo "1*4=4" )
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While attempting to link with QT 4.5 release, I run into this error message
Usually one comes across this problem in python3.0 while attempting a split() method on
While attempting to provide an implimentation to this question , I got stuck on
I am attempting to debug an error while loading my x64 application and am
I have a program that crashes (attempting to read a bad memory address) while
I'm having a strange problem while attempting to transform a blocking socket server into
I've been roasting my brain with my limited SQL knowledge while attempting to come
While attempting to cross-compile ICU using android-ndk-r7 in Linux, the following error occurs after
While attempting to update all my ports / installed ports with portmaster. I receive
While attempting to execute SQL insert statements using Oracle SQL Developer I keep generating

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.