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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T11:11:41+00:00 2026-05-31T11:11:41+00:00

echo $1 $2 $3 ‘ -> echo $1 $2 $3’ args=($@) echo ${args[0]} ${args[1]}

  • 0
echo $1 $2 $3 ' -> echo $1 $2 $3'
args=("$@")
echo ${args[0]} ${args[1]} ${args[2]} ' -> args=("$@"); echo ${args[0]} ${args[1]} ${args[2]}'
echo $@ ' -> echo $@'
echo Number of arguments passed: $# ' -> echo Number of arguments passed: $#' 

This is suppose to be the output

This is suppose to be the output

But I get this instead.

Jasons-MacBook-Pro:bash jasonkim$ bash arguments.sh 
 -> echo $1 $2 $3
 -> args=("$@"); echo ${args[0]} ${args[1]} ${args[2]}
 -> echo $@
Number of arguments passed: 0  -> echo Number of arguments passed: $#
  • 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-31T11:11:42+00:00Added an answer on May 31, 2026 at 11:11 am

    The problem isn’t that you can’t, it’s that you didn’t.

    bash arguments.sh Bash Scripting Tutorial
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

echo date(W,strtotime('2010-01-01')); This outputs 53. I would expect it to output 1. Can anyone
echo date('W'); It gives me 06 , but I only want 6, instead of
echo(073032097109032116104101032118101114121032109111100101108032111102032097032109111100101114110032109097106111114032103101110101114097108046); Essentially, a very large number. Now, why does it output 241872 ? I
echo '<img src=data:image/jpg/png/jpeg;base64,' . base64_encode( $row['image'] ) . ' height=150 />'; This is showing
When echo'ed out instead of just removing all of the other meta tags it
echo $_POST['time'].<br/>; echo $_POST['day'].<br/>; echo $_POST['year'].<br/>; echo $_POST['month'].<br/>; I have value store like this
Consider: echo 50 >> 4; Output: 3 Why does it output 3?
I am using this: echo dirname(__FILE__); which gives: C:\UwAmp\www\myfolder\admin However I am looking for
echo $nav gives code like this: <ul> <li class=someclass>sometext <ul> <li class=someclass>sometext</li> <li class=spacer></li>
echo $CLASSPATH /home/user/tomcat/lib/server-api.jar echo $JAVA_HOME .:/usr/lib/jvm/java-6-sun but when I try to compile .java which

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.