home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d8xx / d811 / bsh.lha / bsh / where < prev   
Text File  |  1993-02-14  |  2KB  |  56 lines

  1. if #argv < 3
  2.     label usage
  3.     echo >&2 "usage:\t$argv[0] {is|are} [your|my|it|there] thing(s)"
  4.     echo >&2 "\t$argv[0] {am|are} [I|you]"
  5.     return
  6. endif
  7. if argv[1] == "am"
  8.     if lower(argv[2]) == "i"
  9.     echo Wherever you go, there you are.
  10.     return
  11.     endif
  12.     goto usage
  13. elseif argv[1] == 'are'
  14.     if argv[2] == 'you'
  15.     echo I am here
  16.     return
  17.     endif
  18. elseif argv[1] != 'is' && argv[1] != 'was' && argv[1] != 'were'
  19.     goto usage
  20. endif
  21. local i w x u v
  22. set u everywhere elsewhere "in a cavern, deep below the surface of Mars"
  23. set v "in the "{bedroom,kitchen,garage,bathtub,sink,"living room"} downtown
  24. set w "out of "{town,sight,"this world"} "on the "{floor,roof,moon}
  25. set x "in "{orbit,hyperspace,"your dreams"}
  26. set u $u $v $w $x "at the bottom of the deep blue sea"
  27. if argv[2]=="there" || argv[2]=="it"
  28.     if argv[1]=="is" || argv[1]=="are" || argv[1]=="was" || argv[1]=="were"
  29.     i=ran(#u)
  30.     echo $argv[2] $argv[1] $argv[3-*] $u[$i]
  31.     return
  32.     endif
  33. endif
  34. i=1
  35. while ++i<#argv
  36.     if argv[i]=='my'
  37.     argv[i]='your'
  38.     elseif argv[i]=='your'
  39.     argv[i]='my'
  40.     endif
  41. endwhile
  42. set v nowhere "gone with the wind" "lost in space" "up in smoke"
  43. set u $u $v "down the "{tubes,drain}
  44. i=ran(#u)
  45. echo $argv[2-*] $argv[1] $u[$i]
  46. return
  47. # a script to help you locate lost items; just ask where things are:
  48. #
  49. #    % where are my sox
  50. #    your sox are in the bedroom
  51. #    % where am I
  52. #    you are there
  53. #
  54. # Where is provided for entertainment purposes only; no warrantee of
  55. # its suitability for any purpose whatsoever is either expressed or implied.
  56.