3 edited body
source | link

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

#!/bin/bash
if test $# -eq 0
then
    echo “No"No arguments”arguments"
elif test $# -eq 1
    echo “$1”"$1"
elif test $# -eq 2
    echo “$1"$1 $2”$2"
else
    echo “More"More than 2 arguments”arguments"
fi

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

#!/bin/bash
if test $# -eq 0
then
    echo “No arguments”
elif test $# -eq 1
    echo “$1”
elif test $# -eq 2
    echo “$1 $2”
else
    echo “More than 2 arguments”
fi

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

#!/bin/bash
if test $# -eq 0
then
    echo "No arguments"
elif test $# -eq 1
    echo "$1"
elif test $# -eq 2
    echo "$1 $2"
else
    echo "More than 2 arguments"
fi
2 added 56 characters in body; edited tags
source | link

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

!/bin/bash

if test $# -eq 0 then echo “No arguments” elif test $# -eq 1 echo “$1” elif test $# -eq 2 echo “$1 $2” else echo “More than 2 arguments” fi

#!/bin/bash
if test $# -eq 0
then
    echo “No arguments”
elif test $# -eq 1
    echo “$1”
elif test $# -eq 2
    echo “$1 $2”
else
    echo “More than 2 arguments”
fi

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

!/bin/bash

if test $# -eq 0 then echo “No arguments” elif test $# -eq 1 echo “$1” elif test $# -eq 2 echo “$1 $2” else echo “More than 2 arguments” fi

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

#!/bin/bash
if test $# -eq 0
then
    echo “No arguments”
elif test $# -eq 1
    echo “$1”
elif test $# -eq 2
    echo “$1 $2”
else
    echo “More than 2 arguments”
fi
1
source | link

syntax error near unexpected token 'elif'

I get the error on the 7th line. Any ideas? I checked for spaces and there are none.

!/bin/bash

if test $# -eq 0 then echo “No arguments” elif test $# -eq 1 echo “$1” elif test $# -eq 2 echo “$1 $2” else echo “More than 2 arguments” fi