Find the answer to your Linux question:
Results 1 to 3 of 3

Thread: Bash Question

Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Bash Question


    my_array=("Location A" "Location B")

    PS3="Would you like to print select locations" "
    select location in"my_array[at symbol]}"; do
    [ "${location}" !="" ] && break
    echo "You have selected location: ${location}"

    I am having trouble getting this piece of code to work. I keep receiving an - unexpected E0F while looking for matching `"' error and syntax error: unexpected end of file

    Help would be very much appreciated. Thank you in advance.

  2. #2
    As a reminder - I cannot print the 'at symbol' because I have not yet posted 15 posts and since the forum thinks I am posting an url, such a symbol will not display.

  3. #3
    Linux Engineer rcgreen's Avatar
    Join Date
    May 2006
    the hills
    Just a wild guess. It has something to do with the quotes.One of your quotes doesn't have a matching opening/closing quote?

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts