home *** CD-ROM | disk | FTP | other *** search
/ Dream 46 / Amiga_Dream_46.iso / bo / boot / root.bin / root / bin / uname < prev    next >
Text File  |  1997-05-07  |  967b  |  55 lines

  1. #!    /bin/ash
  2.  
  3. #todo=`echo $0 | sed -- 's/.*\///'`
  4.  
  5. case $0 in
  6. ps|*/ps)
  7.     for i in /proc/[0-9]*/; do
  8.         read stat < $i/stat
  9.         set -- $stat
  10.         echo "$1    $2"
  11.     done
  12.     ;;
  13. uname|*/uname)
  14.     if [ $# -gt 0 ]; then
  15.         case $1 in
  16.         -r|--release)
  17.             set -- `cat /proc/version`
  18.             echo $3
  19.             ;;
  20.         -s|--sysname)
  21.             echo "Linux"
  22.             ;;
  23.         esac
  24.     else
  25.         echo "Linux"
  26.     fi
  27.     ;;
  28. emacs|*/emacs)
  29.     echo "Emacs and vi are available in Debian, but wouldn't fit on
  30. the installation floppies. Please type \"ae\" to invoke a tiny, but
  31. easy-to-learn editor. As soon as you have you have your system
  32. installed, you may install the \"emacs\" package, and/or the \"vim\"
  33. or \"nvi\" packages. \"vim\" and \"nvi\" each provide a different
  34. version of \"vi\"."
  35.     ;;
  36. vi|*/vi)
  37.     ae -f /etc/ae2vi.rc "$@"
  38.     ;;
  39. mformat|*/mformat)
  40.     ;;
  41. grep|*/grep)
  42.     R="$1"
  43.     shift
  44.     sed /$R/P -n "$@"
  45.     ;;
  46. lsmod|*/lsmod)
  47.     echo "Module         Pages    Used by"
  48.     cat /proc/modules
  49.     ;;
  50. *)
  51.     echo "no function defined for $0"
  52.     exit 1
  53. esac
  54. exit 0
  55.