Help with bash script.

ok did some work gettin caught up on line 118

1:#!/bin/bash
3:PLAYLIST=/home/Fedora11
5:AUDIOPATH=$PLAYLIST/MP3
7:## Functions for each task
9:create_playlist() { 
11:   cd "$AUDIOPATH"
12:   echo -e "Enter Name Of Playlist --> \c"
13:   read PNAME
14:   touch $PNAME.m3u
16:   echo -e
17:   ls -v *.mp3
18:   echo -e
19:}
23:edit_playlist() { 
24:   : put appropriate commands here
25:}
28:delete_playlist() { 
29:  : put appropriate commands here
30:}
33:generate_playlist() { 
34:  : put appropriate commands here
35:}
39:play_mp3() { 
41:    cd "$AUDIOPATH"
42:    ls -v *.mp3
43:    echo -e
44:    echo -e "Please Select Your Song --> \c"
45:    IFS= read DOG
46:    mplayer "$AUDIOPATH"/$DOG 
48:}
51:copy_mp3() { 
53:    cd "$AUDIOPATH"
54:    ls -v *.mp3 >> "$AUDIOPATH"/tempdir.lst # Create Temp file with Directory listing
56:    echo -e "Please Select Your Song To Copy --> \c"
57:    read DONKEY
60:    cat "$AUDIOPATH"/tempdir.lst | while read line; do #Read each line of the file and store the line to $line variable
61:                                     ...
62:                                    done < "$AUDIOPATH"/temp.lst
63:        if [[ $line == $DONKEY ]]; then
64:            echo "File Already Exist, Copy Aborted!"
65:        else
66:            cp $DONKEY "$PLAYLIST"/MP3_1
67:       fi
68:     
69:     rm "$AUDIOPATH"/tempdir.lst # Delete the temporary file containing the directory listing
71:}
74:delete_mp3() { 
76:    cd "$AUDIOPATH"
77:    ls -v *.mp3
78:    echo -e
80:    echo -e "Please Select Which Song To Delete --> \c"
81:    read SONG
82:    rm $SONG
83:    cd "$AUDIOPATH" || exit 1 
85:}
87:## Print menu and execute user's selection
89:while  :
90:do
91:  printf %s '
94:Mp3 Playlist Program:
95:================================
96:C)reate Mp3 Playlist
97:E)dit Mp3 Playlists
98:D)isplay Mp3 Playlists
99:G)enerate Mp3 Database
100:P)lay Mp3
101:1)Copy Mp3
102:2)Remove Mp3
103:Q)uit
104:Enter your selection ==> '
106:  read ANS
107:debug: ANS= "$ANS"
108:...
109: case "$ANS" in
110:    "c" | "C" ) create_playlist ;;
111:    "e" | "E" ) edit_playlist ;;
112:    "d" | "D" ) delete_playlist ;;
113:    "g" | "G" ) generate_playlist ;;
114:    "p" | "P" ) play_mp3 ;;
115:    "o" | "O" ) copy_mp3 ;;
116:    "l" | "L" ) delete_mp3 ;;
117:    "q "| "Q" ) exit ;;
118:...  
119:esac
120:done

You forgot to quote $DOG:

46:    mplayer "$AUDIOPATH/$DOG"

Fixed that still error on 118
line 118: syntax error near unexpected token `newline'
line 118: `... '

Please read the error message.

Why is "..." in your script?

I dont know i was told by another guy to put that there

Please try to understand what you are doing; don't blindly follow everything anyone tells you.

There is no command, '...'; remove them in both places.

Do you have a command called 'debug:'? If not, remove it.

Ok i removed the '...'

i have it dubug the $ANS thats all..
now its stoppin on the last line.
line 123 unexpected end of file syntax error

What does that mean?

Do you or do you not have a command on your systems named 'debug:'?

If not, remove that line. (I'm positive that you don't have such a command.)

ok i removed this line below -->

107:debug: ANS= "$ANS"

ran it again
syntax error line 121 unexpected end of file

You still have some unquoted variable references:

  touch $PNAME.m3u

  if [[ $line == $DONKEY ]]; then

    cp $DONKEY "$PLAYLIST"/MP3_1

  rm $SONG

And [[ $line == $DONKEY ]] is not standard syntax; use [ "$line" = "$DONKEY" ].

disregaurd this post i solved my latest problem