The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Tutorials? (http://hintsforums.macworld.com/showthread.php?t=21778)

gldfshkpr 03-17-2004 01:28 AM

Tutorials?
 
Anyone know of any decent tutorials for a newby to bash?

P.S. , what I really want to know is how to send and receive email in terminal. Thanks!

hayne 03-17-2004 04:06 AM

Doing email in the Terminal is not related to bash.
All you need to know is how to run an email program - e.g. "elm", or "mutt", etc.
You do this by typing the name of the program.
But first you need to install these programs, since they aren't part of standard OS X. The easiest way to do this is probably by using "Fink".

Here's a forum thread discussing some of these command-line email programs:
http://forums.macosxhints.com/showth...threadid=12424

gldfshkpr 03-17-2004 01:44 PM

Thanks hayne, guess I'll check out Mutt. Doesn't seem to be installed. I typed "man mutt" and came up with nothing. I suppose I'll have to download it?


P.S. On a side note: I use the transparent option on my terminal windows and it sometimes leaves a ghost image when I scroll. Is this normal?

gldfshkpr 03-17-2004 08:43 PM

Well, it looks like setting up email with the CLI is way too complicated and involved for me! The mail.app does a nice job anyhow. Does anyone know of any good general tutorials to get my feet wet with in Bash? I'm using Pico and have kinda figured out how to use vim. What other cool apps are there?

trevor 03-17-2004 08:55 PM

If you are interested in using the command line in OS X, I would highly recommend that you install fink http://fink.sourceforge.net/ .

Fink allows you to install lots of free open source software by simply typing something like
fink install mutt
or
fink install pine
on your command line.

Trevor

gldfshkpr 03-17-2004 09:44 PM

cool - what types of applications would I want to install?

trevor 03-17-2004 11:46 PM

That's like asking, "What foods would I like to eat?" There's many many choices and I don't know enough about you to make any recommendations.

You expressed an interest above in a command-line e-mail client, so that's one place you could start. To give you some feeling for fink, here are the fink programs relating to mail in some way:

Code:

% fink apropos mail
Information about 2879 packages read in 3 seconds.
    bbmail          0.6.11-22    Email-watcher designed for use with Blackbox
    clearmailspool  1.0-1        Simple script to clear sendmail spool
    convert-tnef-pm  0.17-1      Convert Microsoft mail attachments
 i  email-find-pm    0.09-11      Placeholder for versioned Email::Find pac...
 i  email-find-p...  0.09-10      Find RFC 822 email addresses in plain text
 i  email-valid-pm  0.15-11      Placeholder for versioned Email::Valid pa...
 i  email-valid-...  0.15-10      Determines whether an email address is we...
    evolution        1.4.5-7      Advanced email client
    fetchmail        6.2.5-10    Fetch mail from POP3 and IMAP server
    getmail          3.2.1-1      Python-based POP3 mail retriever
    hotway          0.51-12      HTTP Gateway to access Hotmail with POP3 ...
    kmail            3.2.1-21    KDE - e-mail client
    korn            3.2.1-21    KDE - e-mail monitoring
    logrotate        3.6.5-3      Rotates, compresses, removes and mails logs
    mail-folder-pm  0.07-3      Perl interface to mailboxes
    maildrop        1.6.3-1      Mail delivery agent with filtering abilities
 i  mailtools-pm    1.60-1      Perl modules related to mail applications
    mhonarc          2.6.8-1      Converts mail messages to HTML
    mozilla-mail...  1.5.1-1      Mozilla - mail and news support
    mutt            1.4.1i-21    Sophisticated text-based mail user agent
 i  mutt-ssl        1.4.1i-11    Sophisticated text-based mail user agent
    nmh              1.0.4-1      New Mail Handler (spool-based)
 i  pine            4.58-21      Text based tool for managing emails
    pine-ssl        4.58-22      Text based tool for managing emails
    procmail        3.22-1      Mail processing program
    sylpheed        0.9.7-1      GTK+ based lightweight and fast e-mail cl...
    sylpheed-ssl    0.9.7-1      GTK+ based lightweight and fast e-mail cl...
    tmda            1.0.2-1      Anti-spam system & local mail delivery agent
    webmin-fetch...  1.100-1      Webmin module: Fetchmail Mail Retrieval
    webmin-procmail  1.100-1      Webmin module: Procmail Mail Filter
    webmin-sendmail  1.100-1      Webmin module: Sendmail Configuration
    webmin-x-qmail  1.100-1      EXTRA Webmin module: QMail Configuration
    webmin-x-vgetty  1.100-1      EXTRA Webmin module: Voicemail Server

I really think you'd be better off installing fink, then typing fink list to look at the programs. Or if you wish, install fink then get the GUI app Fink Commander to help choosing programs to install.

Trevor

gldfshkpr 03-18-2004 12:10 AM

nice... thanks for your help, trevor. I'll definitely install Fink. Thanks for the tips!

gldfshkpr 03-18-2004 01:39 AM

hmm... i'm having some trouble here. Can't seem to get this to work. Any ideas why? Here's the output:

Last login: Wed Mar 17 22:27:35 on ttyp1
Welcome to Darwin!
Kirk-Boragines-Computer:~ kirkboragine$ fink install xpdf
sudo /sw/bin/fink install xpdf
Information about 1112 packages read in 1 seconds.

fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1) xfree86-base-threaded-shlibs: XFree86 libraries, utilities, clients and data
(2) xfree86-base-shlibs: XFree86 libraries, utilities, clients and data
(3) xfree86-shlibs: XFree86 distribution

Pick one: [1] 3

fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1) ghostscript-fonts: Standard fonts for Ghostscript
(2) system-ghostscript: Placeholder package for manually installed ghostscript
(3) system-ghostscript6: Placeholder package for manually installed ghostscript 6.01

Pick one: [1] 3
The following package will be installed or updated:
xpdf
The following 8 additional packages will be installed:
dlcompat-dev dlcompat-shlibs system-ghostscript6 t1lib1 t1lib1-shlibs
type1inst xfree86 xfree86-shlibs
Do you want to continue? [Y/n] 3
Do you want to continue? [Y/n] y
rm -rf dlcompat-20030629-15
mkdir -p /sw/src/dlcompat-20030629-15
gzip -dc /sw/src/dlcompat-20030629.tar.gz | /sw/bin/tar -xf -
patch -p1 </sw/fink/dists/stable/main/finkinfo/libs/dlcompat.patch
patching file dlfcn.c
./configure --prefix=/sw --enable-fink --mandir=/sw/share/man
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
### execution of ./configure failed, exit code 1
Failed: compiling dlcompat-20030629-15 failed
Kirk-Boragines-Computer:~ kirkboragine$ clear


Kirk-Boragines-Computer:~ kirkboragine$ fink install xpdf
sudo /sw/bin/fink install xpdf
Information about 1112 packages read in 1 seconds.

fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1) xfree86-base-threaded-shlibs: XFree86 libraries, utilities, clients and data
(2) xfree86-base-shlibs: XFree86 libraries, utilities, clients and data
(3) xfree86-shlibs: XFree86 distribution

Pick one: [1] 3

fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1) ghostscript-fonts: Standard fonts for Ghostscript
(2) system-ghostscript: Placeholder package for manually installed ghostscript
(3) system-ghostscript6: Placeholder package for manually installed ghostscript 6.01

Pick one: [1] 1
The following package will be installed or updated:
xpdf
The following 8 additional packages will be installed:
dlcompat-dev dlcompat-shlibs ghostscript-fonts t1lib1 t1lib1-shlibs
type1inst xfree86 xfree86-shlibs
Do you want to continue? [Y/n] y
curl -f -L -O http://distfiles.opendarwin.org/ghos...std-6.0.tar.gz
% Total % Received % Xferd Average Speed Time Curr.
Dload Upload Total Current Left Speed
100 1836k 100 1836k 0 0 281k 0 0:00:06 0:00:06 0:00:00 353k
rm -rf dlcompat-20030629-15
mkdir -p /sw/src/dlcompat-20030629-15
gzip -dc /sw/src/dlcompat-20030629.tar.gz | /sw/bin/tar -xf -
patch -p1 </sw/fink/dists/stable/main/finkinfo/libs/dlcompat.patch
patching file dlfcn.c
./configure --prefix=/sw --enable-fink --mandir=/sw/share/man
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
### execution of ./configure failed, exit code 1
Failed: compiling dlcompat-20030629-15 failed
Kirk-Boragines-Computer:~ kirkboragine$ clear

Kirk-Boragines-Computer:~ kirkboragine$ fink install xpdf
sudo /sw/bin/fink install xpdf
Information about 1112 packages read in 1 seconds.

fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1) xfree86-base-threaded-shlibs: XFree86 libraries, utilities, clients and data
(2) xfree86-base-shlibs: XFree86 libraries, utilities, clients and data
(3) xfree86-shlibs: XFree86 distribution

Pick one: [1] 3

fink needs help picking an alternative to satisfy a virtual dependency. The
candidates:

(1) ghostscript-fonts: Standard fonts for Ghostscript
(2) system-ghostscript: Placeholder package for manually installed ghostscript
(3) system-ghostscript6: Placeholder package for manually installed ghostscript 6.01

Pick one: [1] 3
The following package will be installed or updated:
xpdf
The following 8 additional packages will be installed:
dlcompat-dev dlcompat-shlibs system-ghostscript6 t1lib1 t1lib1-shlibs
type1inst xfree86 xfree86-shlibs
Do you want to continue? [Y/n] y
rm -rf dlcompat-20030629-15
mkdir -p /sw/src/dlcompat-20030629-15
gzip -dc /sw/src/dlcompat-20030629.tar.gz | /sw/bin/tar -xf -
patch -p1 </sw/fink/dists/stable/main/finkinfo/libs/dlcompat.patch
patching file dlfcn.c
./configure --prefix=/sw --enable-fink --mandir=/sw/share/man
checking for gcc... no
checking for cc... no
checking for cc... no
checking for cl... no
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
### execution of ./configure failed, exit code 1
Failed: compiling dlcompat-20030629-15 failed
Kirk-Boragines-Computer:~ kirkboragine$

gldfshkpr 03-18-2004 01:43 AM

oops! i didn't mean to include all three attempts... you get the idea though.

trevor 03-18-2004 02:36 AM

Quote:

checking for gcc... no
checking for cc... no
checking for cc... no
Yes, fink compiles the programs from the source code. Above, it is looking for a compiler and not finding one.

You can install one manually, if you wish, but by far the best, easiest, most complete way to get a compiler is to install Developer Tools from Apple. It comes with the gcc, the gnu c compiler. You probably got a Developer Tools CD with your Install CDs, but if you didn't, you can also sign up for a free membership to the Apple Developer Connection http://developer.apple.com/ and then download it. (Well, I guess downloading it isn't the easiest, but it is still the best and most complete.)

Trevor

gldfshkpr 03-18-2004 02:49 PM

okay - cool. Installed the developer's tools (didn't realize it would take 2 hours!). I'm trying to figure out how to install this game... "3dpong-0.4". It was the first one on the list when i typed "fink list". I figured out how to unzip it. Just need to figure out how to run it! Forgot how to get back to the readme file. Now I'm stuck with looking at the file name and not knowing what to do next! Kinda fun so far... thanks for bearing with me, trevor!

gldfshkpr 03-18-2004 02:54 PM

Here we go... this is where I'm at: (in the readme file)

INSTALLING

To install 3D Pong, edit the "makefile" as needed. Predefined variables
are declared for:

CC - Your C Compiler. "gcc" is recommended.
XLIB - The location and name of your X window library.

From a telnet session, simply type "make". The "3dpong" executable should
be created.
____________________________________________

Not sure what all that means... "edit the makefile as needed"?
"from a telnet session..."?

trevor 03-18-2004 03:06 PM

You don't need to do all that--fink does it for you.

If you typed
fink install 3dpong
then it is already installed, probably at /sw/bin/3dpong. To execute it, you will type
3dpong options

I've never tried using 3dpong, so I'm not exactly sure what the options are. But if you just type 3dpong on the command line, you should get usage information.

Note: I'm not sure 3dpong is a good first app to try out fink, though. Does it depend on X Windows? That's a long install.

Trevor

gldfshkpr 03-18-2004 05:08 PM

right - Fink did install it... this is where i'm at now:

Code:

RUNNING THE GAME

  To run the game, type "3dpong" followed by the following, depending on the
  game mode:

  One player game:

    player's server
    the word "computer"

    Example:  3dpong $DISPLAY computer
              3dpong machine.domain.com:0.0 computer

Does this mean i'll be playing this game online? What's my "server"? I'm guessing it's "Kirk-Boragines-Computer.local". That's what i get when i input "hostname" in the CLI. I'm not sure pong depends on x windows. The reason i chose pong is it sounds basic. I figured I'd try something easy and use it as a template of sorts for my other adventures. :-/

P.S. "options" returns an unknown error:0

gldfshkpr 03-18-2004 05:26 PM

Here's what i'm trying to no avail...

Code:

Kirk-Boragines-Computer:/sw/src kirkboragine$ ls -l
total 204560
drwx------  23 11858  kirkbora      782 10 May  2001 3dpong-0.4
-rw-r--r--  1 root  admin        33910 17 Mar 22:18 3dpong-0.4.tar.gz
-rw-r--r--  1 root  admin    47287795 17 Mar 22:20 X4211src.tar.bz2
-rw-r--r--  1 root  admin    53464418 17 Mar 22:27 X430.tar.bz2
-rw-r--r--  1 root  admin        54848 17 Mar 22:18 dlcompat-20030629.tar.gz
-rw-r--r--  1 root  admin      1881034 17 Mar 22:36 ghostscript-fonts-std-6.0.tar.gz
-rw-r--r--  1 root  admin      1528684 17 Mar 22:33 t1lib-1.3.1.tar.gz
-rw-r--r--  1 root  admin        27966 17 Mar 22:33 type1inst-0.6.1.tar.gz
-rw-r--r--  1 root  admin      441968 17 Mar 22:33 xpdf-1.01.tar.gz
Kirk-Boragines-Computer:/sw/src kirkboragine$ 3dpong Kirk-Boragines-Computer.local computer
Kirk-Boragines-Computer.local: Unknown error: 0
Kirk-Boragines-Computer:/sw/src kirkboragine$


trevor 03-18-2004 05:27 PM

Yeah, options was not meant to be typed literally, I meant that there were probably other things you'd need to type. Since I'm not at all familiar with 3dpong, I don't know what those options are.

Trevor

gldfshkpr 03-18-2004 06:38 PM

Well, 3dpong is an X-Window game. I'm guessing I need to install X-Window. That's not going to happen right now. All I really want to do is learn how to intall and run an app using the CLI. Any suggestions are welcome. :confused:

huskerchad 03-18-2004 07:32 PM

Installing X11 is easier than you think. It is on the Panther installer CD. Give it a shot.

trevor 03-18-2004 09:29 PM

For an introduction to fink, why don't you type
fink install pine
?

Pine is an e-mail client. To launch it the first time after you've installed it, just type
pine

It comes with a man page, unlike 3dpong, so if you have questions, type
man pine

Pine is very simple to use, it gives you on-screen prompts, sort of like pico. It should be a far better starter app than something complicated and graphical.

Trevor

Treavize 03-19-2004 03:33 AM

Here are a few cli apps I have installed w/ Fink.

links-ssl - is a text based internet browser. works well w/ Mac OSX Hints and Low End Mac websites.

fortune-mod - Database of witticisms. I use this to feed fortunes to Terminal. See below ( notice I still use tcsh )....

Last login: Fri Mar 19 02:21:03 on ttyp2
Welcome to Darwin!
There are bugs and then there are bugs. And then there are bugs.
-- Karl Lehenbauer
[Sagebox:~] treavize%

dict - this is a dictionary that fetches definitions from the internet.

wtf - same as above but for acronyms.

joe - is a text editor like pico but with a fun name.

the above programs will get you started with fink installed cli fun.

gldfshkpr 03-19-2004 04:08 PM

well, i need a bit more instruction on the basics at this point. I found some decent info at the linux.org site. It doesn't seem to want to hyperlink here. I found it doing a google for "bash shell tutorial". Thanks for everyone suggestions!

gldfshkpr 03-21-2004 03:49 PM

Here is an excellent source of tutorials I found...

Tutorials


All times are GMT -5. The time now is 10:41 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.