Featured post

c# - Usage of Server Side Controls in MVC Frame work -

i using asp.net 4.0 , mvc 2.0 web application. project requiremrnt have use server side control in application not possibl in noraml case. ideally want use adrotator control , datalist control. i saw few samples , references in codepleax mvc controllib howwver found less useful. can tell how utilize theese controls in asp.net application along mvc. note: please provide functionalities related adrotator , datalist controls not equivalent functionalities thanks in advace. mvc pages not use normal .net solution makes use of normal .net components impossible. a normal .net page use event driven solution call different methods service side mvc use actions , view completly different way handle things. also, mvc not use viewstate normal .net controlls require. found article discussing mixing of normal .net , mvc.

bash - When i Choose from The main Menu I Get: game.sh: 423: Syntax error: end of file unexpected (expecting "fi") -


!# /bin/sh # game.sh:  #  chooses games based on genre , title #  shows descriptions of games  # genre menu clear printf "%s\n" "game genre menu" printf "%s\n" printf "%s\n" "1. first person shooter" printf "%s\n" "2. arcade" printf "%s\n" "3. rpg" printf "%s\n" "4. rpg (infocom a-jo)" #1-12 printf "%s\n" "5. rpg (infocom le-st)" #13-24 printf "%s\n" "6. rpg (infocom su-zo)" #25-36 printf "%s\n" "7. rpg (infocom zzinvisiclues)" #37-45 read -p "enter number: " genre  if [ $genre = 1 ]   # menu first person shooters  clear  printf "%s\n" "first person shooter menu"  printf "%s\n"  printf "%s\n" "1. doom"  printf "%s\n" "2. doom ii"  printf "%s\n" "3. final doom (tnt)"  printf "%s\n" "4. final doom (plutonia)"  printf "%s\n" "5. quake"  printf "%s\n" "6. duke nukem 3d atomic edition"  printf "%s\n" "7. heretic"  printf "%s\n" "8. hexen"  printf "%s\n" "9. shadow warrior"  read -p "enter number: " fpsgame   # fpsgame choices   if [ $fpsgame = 1 ]       cd /mnt/mmcblk0p1/bkup/games/doom/prboom/     ./prboom   elif [ $fpsgame = 2 ]       cd /mnt/mmcblk0p1/bkup/games/doom2/prboom/     ./prboom   elif [ $fpsgame = 3 ]        cd /mnt/mmcblk0p1/bkup/games/tnt/prboom/     ./prboom   elif [ $fpsgame = 4 ]       cd /mnt/mmcblk0p1/bkup/games/plutonia/prboom/     ./prboom   elif [ $fpsgame = 5 ]       cd /mnt/mmcblk0p1/bkup/games/sdlquake/     ./sdlquake     elif [ $fpsgame = 6 ]       cd /mnt/mmcblk0p1/bkup/games/eduke32/     ./eduke32   elif [ $fpsgame = 7 ]       cd /mnt/mmcblk0p1/bkup/games/hheritic-0.2.0-src/     ./hheretic-sdl   elif [ $fpsgame = 8 ]     cd /mnt/mmcblk0p1/bkup/games/hhexen-1.6.0/   ./hhexen-sdl   elif [ $fpsgame = 9 ]     cd /mnt/mmcblk0p1/bkup/games/shadow_warrior/   ./sw   else     printf "%s\n" "oops! unknown selection."   fi   elif [ $genre = 2 ]   # menu arcade  clear  printf "%s\n" "arcade menu"  printf "%s\n"  printf "%s\n" "1. ascii portal"  printf "%s\n" "2. dave gnukem"  printf "%s\n" "3. open liero"  printf "%s\n" "4. open tyrian"  printf "%s\n" "5. powermanga"  printf "%s\n" "6. asteroids"  printf "%s\n" "7. spout"  printf "%s\n" "8. tcgs car"  read -p "enter number: " arcgame   # arcgame choices   if [ $arcgame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/asciiportal/    ./asciiportal   elif [ $arcgame = 2 ]      cd /mnt/mmcblk0p1/bkup/games/davegnukem/    ./davegnukem.dge   elif [ $arcgame = 3 ]      cd /mnt/mmcblk0p1/bkup/games/openliero/    ./liero1.34   elif [ $arcgame = 4 ]      cd /mnt/mmcblk0p1/bkup/games/opentyrian    ./opentyrian.dge   elif [ $arcgame = 5 ]      cd /mnt/mmcblk0p1/bkup/games/powermanga    ./powermanga   elif [ $arcgame = 6 ]      cd /mnt/mmcblk0p1/bkup/games/sdlroids    ./sdlroids   elif [ $arcgame = 7 ]      cd /mnt/mmcblk0p1/bkup/games/spout/    ./spout   elif [ $arcgame = 8 ]      cd /mnt/mmcblk0p1/bkup/games/tcgs_car/    ./tcgs_car   else    printf "%s\n" "oops! unknown selection."   fi   elif [ $genre = 3 ]   # menu rpg  clear  printf "%s\n" "rpg menu"  printf "%s\n"  printf "%s\n" "1. meritous"  printf "%s\n" "2. nethack"  printf "%s\n" "3. powder"  read -p "enter number: " rpggame   # rpggame choices   if [ $rpggame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/meritous/    ./meritous.dge   elif [ $rpggame = 2 ]      cd /mnt/mmcblk0p1/bkup/games/nethack-3.4.3-nanonote-bin/    ./nethack   elif [ $rpggame = 3 ]      cd /mnt/mmcblk0p1/bkup/games/powder    ./powder   else    printf "%s\n" "oops! unknown selection."   fi   elif [ $genre = 4 ]   # menu rpg (infocom a-jo)  clear  printf "%s\n" "rpg {infocom a-jo) menu"  printf "%s\n"  printf "%s\n" "1. mind forever voyaging (1985)"  printf "%s\n" "2. arthur (1989)"  printf "%s\n" "3. ballyhoo (1986)"  printf "%s\n" "4. beyond zork: coconut of quendor (1987)"  printf "%s\n" "5. border zone (1987)"  printf "%s\n" "6. bureaucracy (1987)"  printf "%s\n" "7. cutthroats (1984)"  printf "%s\n" "8. deadline (1982)"  printf "%s\n" "9. enchanter (1983)"  printf "%s\n" "10. hollywood hijinx (1986)"  printf "%s\n" "11. infidel (1983)"  printf "%s\n" "12. journey (1989)"  read -p "enter number: " infoajgame   # infoajgame choices   if [ $infoajgame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/a_mind_forever_voyaging/amfv.z4    elif [ $infoajgame = 2 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/arthur/arthur.z6     elif [ $infoajgame = 3 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/ballyhoo/ballyhoo.z3   elif [ $infoajgame = 4 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/beyond_zork_the_coconut_of_quendor/beyondzo.z5    elif [ $infoajgame = 5 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/border_zone/borderzo.z5   elif [ $infoajgame = 6 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/bureaucracy/bureaucrpatched.z4    elif [ $infoajgame = 7 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/cutthroats/cutthroa.z3   elif [ $infoajgame = 8 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/deadline/deadline.z3   elif [ $infoajgame = 9 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/enchanter/enchante.z3   elif [ $infoajgame = 10 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/hollywood_hijinx/hollywoo.z3   elif [ $infoajgame = 11 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/infidel/infidel.z3   elif [ $infoajgame = 12 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    ./frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/journey/journey.z6   else    printf "%s\n" "oops! unknown selection."   fi   elif [ $genre = 5 ]   # menu rpg (infocom le-st)  clear  printf "%s\n" "rpg {infocom le-st) menu"  printf "%s\n"   printf "%s\n" "1. leather goddesses of phobos (1986)"     printf "%s\n" "2. moonmist (1986)"  printf "%s\n" "3. nord , bert couldn't make head or tail of (1987)"  printf "%s\n" "4. planetfall (1983)"  printf "%s\n" "5. plundered hearts (1987)"  printf "%s\n" "6. seastalker (1984)"  printf "%s\n" "7. sherlock: riddle of crown jewels (1987)"  printf "%s\n" "8. shogun (1988)"  printf "%s\n" "9. sorcerer (1984)"  printf "%s\n" "10. spellbreaker (1985)"  printf "%s\n" "11. starcross (1982)"  printf "%s\n" "12. stationfall (1987)"  read -p "enter number: " infolsgame   # infolsgame choices   if [ $infolsgame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/leather_goddesses_of_phobos/leather.z3   if [ $infolsgame = 2 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/moonmist/moonmist.z3   if [ $infolsgame = 3 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/nord_and_bert_couldnt_make_head_or_tail_of_it/nordandb.z4   if [ $infolsgame = 4 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/planetfall/planetfa.z3   if [ $infolsgame = 5 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/plundered_hearts/plundere.z3   if [ $infolsgame = 6 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/seastalker/seastalk.z3   if [ $infolsgame = 7 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/sherlock_the_riddle_of_the_crown_jewels/sherlock.z5   if [ $infolsgame = 8 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/shogun/shogun.z6   if [ $infolsgame = 9 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/sorcerer/sorcerer.z3   if [ $infolsgame = 10 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/spellbreaker/spellbre.z3   if [ $infolsgame = 11 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/starcross/starcros.z3   if [ $infolsgame = 12 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/stationfall/stationf.z3   else    printf "%s\n" "oops! unknown selection."    fi   elif [ $genre = 6 ]   # menu rpg (infocom su-zo)  clear  printf "%s\n" "rpg (infocom su-zo) menu"  printf "%s\n"  printf "%s\n" "1. suspect (1984)"  printf "%s\n" "2. suspended (1983)"  printf "%s\n" "3. hitchhikers guide galaxy (1987)"  printf "%s\n" "4. lurking horror (1984)"  printf "%s\n" "5. witness (1982)"  printf "%s\n" "6. trinity (1986)"  printf "%s\n" "7. wishbringer (1985)"  printf "%s\n" "8. zork 1: great underground empire (1981)"  printf "%s\n" "9. zork 2: wizard of frobozz (1981)"  printf "%s\n" "10. zork 3: dungeon master (1982)"  printf "%s\n" "11. zork: undiscovered underground (1997)"  printf "%s\n" "12. zork zero: revenge of megaboz (1988)"  read -p "enter number: " infoszgame   # infoszgame choices   if [ $infoszgame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/suspect/suspect.z3   if [ $infoszgame = 2 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/suspended/suspend.z3   if [ $infoszgame = 3 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/the_hitchhikers_guide_to_the_galaxy/hitchhik.z5   if [ $infoszgame = 4 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/the_lurking_horror/lurking.z3   if [ $infoszgame = 5 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/the_witness/witness.z3   if [ $infoszgame = 6 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/trinity/trinity.z4   if [ $infoszgame = 7 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/wishbringer/wishbrin.z3   if [ $infoszgame = 8 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zork_1_the_great_underground_empire/zork1.z3   if [ $infoszgame = 9 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zork_2_the_wizard_of_frobozz/zork2.z3   if [ $infoszgame = 10 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zork_3_the_dungeon_master/zork3.z3   if [ $infoszgame = 11 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zork_the_undiscovered_underground/ztuu.z5   if [ $infoszgame = 12 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zork_zero_the_revenge_of_megaboz/zork0.z6   else    printf "%s\n" "oops! unknown selection."    fi   elif [ $genre = 7 ]   # menu rpg (infocom zzinvisiclues)  clear  printf "%s\n" "rpg (infocom zzinvisiclues) menu"  printf "%s\n"  printf "%s\n" "1. advntizm"   printf "%s\n" "2. comdyizm"  printf "%s\n" "3. diversizm"  printf "%s\n" "4. fant1izm"  printf "%s\n" "5. fant2izm"  printf "%s\n" "6. hitchhik"  printf "%s\n" "7. mystizm"  printf "%s\n" "8. scifizm"  read -p "enter number: " infozzgame   # infozzgame choices   if [ $infozzgame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/advntizm.z5   if [ $infozzgame = 2 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/comdyizm.z5   if [ $infozzgame = 3 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/diversizm.z5   if [ $infozzgame = 4 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/fant1izm.z5   if [ $infozzgame = 5 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/fant2izm.z5   if [ $infozzgame = 6 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/hitchhik.z5   if [ $infozzgame = 7 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/mystizm.z5   if [ $infozzgame = 8 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/zzinvisiclues/scifizm.z5   else    printf "%s\n" "oops! unknown selection."    fi  fi 

you must end all if statements fi. seems me might want elif instead of if there says if [ $infolsgame = 2 ], , subsequent alternatives. switch statement might better suited type of situation.

  # infolsgame choices   if [ $infolsgame = 1 ]      cd /mnt/mmcblk0p1/bkup/games/frotz/    .frotz /mnt/mmcblk0p1/bkup/games/frotz/infocom/leather_goddesses_of_phobos/leather.z3   if [ $infolsgame = 2 ]       ... 

Comments

Popular posts from this blog

c# - Usage of Server Side Controls in MVC Frame work -

cocoa - Nesting arrays into NSDictionary object (Objective-C) -

ios - Very simple iPhone App crashes on UILabel settext -