========= installing a unix shell ======== (updated: 10feb2003 9pm) This is cut and paste from an email I sent someone about how to do this, for this its best to go beyond Geekgadgets (GG) boot install, to get a full minimal install, visit ftp://ftp.geekgadgets.org/pub/geekgadgets/amiga/m68k/snapshots/990529 and ftp://ftp.geekgadgets.org/pub/geekgadgets/amiga/m68k/snapshots/990529/bin and download the following files: BOOT.lha, BOOT.lha.readme, GG-misc-bin.tgz, ixemul-48.0-bin.tgz, fifolib-38.4-bin.tgz, fileutils-4.0-bin.tgz, sh-utils-1.16-bin.tgz, some of these may have been replaced by newer versions if so use those instead, if you have problems with the URL, look in other subdirectories of ftp://ftp.geekgadgets.org/pub/geekgadgets/amiga/m68k/ "BOOT" is from "pulling yourself up by your BOOTstraps" and not the german word for boat! (U-boat==submarine), for this install you can ignore BOOT.lha.readme as it has some missing assigns and is slightly confusing, 1. Just for this install make an assign archives: to the directory containing the above 7 files, 2. create a brand new directory on a partition with a lot of free space eg 1/2 Gig or 1 gig free, make an assign GG: to this directory, the directory needs to be big to allow for future things you may download from the above URL, 3. REMOVE BY RENAMING ANY EXISTING ixemul.library, eg find your current ones thus: list libs: pat=ixemul.library lformat=%f%n the reason for this is a lot of people use a wrong ixemul setup, (you could even do: list libs: pat=ixemul.library lformat="rename %f%n %f%n_hidden" >ram:a execute ram:a ) reboot to remove any existing loaded ixemul.library, 4. With the above 2 assigns archives: and gg: do the following steps, I have not used a script-file because some of the names may be slightly different eg if newer versions of files are now available: Ignore any "Broken pipe -gzip" messages, download: http://www.whoosh777.pwp.blueyonder.co.uk/whoosh_untargz copy whoosh_untargz gg: echo "BOOT.lha:" >>gg:doc date >>gg:doc lha -xander x archives:boot.lha gg: >>gg:doc ; the absolute smallest setup, ; the -n option for lha switches off the progress indicator, makedir gg:info makedir gg:etc ; :they forgot to do this! assign etc: gg:etc assign libs: gg:sys/libs add path gg:bin add assign bin: gg:bin cd gg: gg:whoosh_untargz archives:GG-misc-bin.tgz gg:whoosh_untargz archives:ixemul-48.0-bin.tgz gg:whoosh_untargz archives:fifolib-38.4-bin.tgz gg:whoosh_untargz archives:fileutils-4.0-bin.tgz gg:whoosh_untargz archives:sh-utils-1.16-bin.tgz setenv PATH ./:/bin:/c ; : separated list of directories for the unix shell to ; find programs, a bit like c:path ; . == current directory, ..==parent directory copy env:PATH envarc:PATH setenv HOME . ; directory you reach if you type cd within the geek shell, ; I set it to . == current directory, which is a trick of ; my own! copy env:HOME envarc:HOME 5. The install is now complete, fileutils and sh-utils gives you a lot of useful unix shell stuff similar to our c: gg:whoosh_untargz is my AmigaOS shell script for extracting from #?.tgz == #?.tar.gzip files, it also keeps track of the decompressions into the file gg:doc (my idea) Have a look at gg:doc to see what you have installed and which archives the things came from. Also have a look at gg:whoosh_untargz, 6. If you want to install further GG things from the above website then lets say the downloaded archive is somewhere:xyz.tgz, then you would install it thus: cd gg: gg:whoosh_untargz somewhere:xyz.tgz this will also automatically keep track of the decompression to gg:doc, *never* rename anything that has been decompressed to gg: everything has to be in exactly the right place with exactly the right name. gg:whoosh_untargz unarchives .tar.gzip == .tgz archives to the current directory, keeping track in a file called doc also in the current directory, 7. startup for gg: i. set up the gg: assign ii. run the following shell script: execute GG:Sys/S/GG-Startup :this is the full GG startup, all assigns are now done, 8. starting the unix shell: i. follow step 7. ii. from an AmigaOS shell type: gg:bin/sh (you could also type sh ) wait a few moments and you will get the unix shell prompt $ to prove that you are now in unix (almost) try the following unix shell command: $ ls /ram ; ls /c ; x=hello ; echo $x ; (dont type the first $, do type the second $ in $x, also no spaces in x=hello, (x = hello is wrong!),) unix allows multiple commands in 1 line separated by ;'s as demonstrated here, this is more useful than AmigaOS's control-return as control-return cannot be put in a script file, ie control-return is interactive only, the unix shell syntax is similar but not identical to c's syntax, what this shell line will do is first run ls /ram ls is a bit like c:list, echo is virtually the same as c:echo, ls == l.ist and s.ort /ram is the unix way to do ram:, so eg /ram/x/y/z is our ram:x/y/z /something is the same as our something: then the above command does "ls /c" similar to "c:list c:" x=hello sets the shell variable x to have value hello, lastly "echo $x" prints the value of this shell variable, 9. to exit the unix shell type $ exit you now return to the AmigaOS shell, ============= to fully understand the unix shell ======== you need to buy a book, to fully understand the unix shell takes a long time, months of learning curve, The Unix shell is very sophisticated, its as powerful as C, (but oriented around strings and files), The disadvantage of it is there is a vast amount of learning curve. The Unix shell runs on all platforms so you can write totally portable shell scripts, There are many different Unix shells (zsh, csh, ksh, bash, sh, tcsh), people tend to write shell scripts in the subset common to all the different shells which coincides with the Bourne shell /bin/sh (bin:sh for Amigaos). Thus for scripts you should only learn the original Bourne shell sh, The Linux shell is a Unix shell: Bourne again shell, (imitation is the sincerest form of flattery), Bourne shell and pdksh are both available for AmigaOS,