Results 1 to 3 of 3
#!/bin/bash[/CODE]
my_array=("Location A" "Location B")
PS3="Would you like to print select locations" "
select location in"my_array[at symbol]}"; do
[ "${location}" !="" ] && break
done
echo "You have selected location: ...
- 10-26-2010 #1Just Joined!
- Join Date
- Oct 2010
- Posts
- 4
Bash Question
#!/bin/bash[/CODE]
my_array=("Location A" "Location B")
PS3="Would you like to print select locations" "
select location in"my_array[at symbol]}"; do
[ "${location}" !="" ] && break
done
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.
- 10-26-2010 #2Just Joined!
- Join Date
- Oct 2010
- Posts
- 4
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.
- 10-27-2010 #3
Just a wild guess. It has something to do with the quotes.One of your quotes doesn't have a matching opening/closing quote?


Reply With Quote