Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > New to the command line

New to the command line
Thread Tools
art_director
Professional Poster
Join Date: Mar 2002
Location: Minneapolis, MN U.S.A.
Status: Offline
Reply With Quote
Jan 11, 2005, 11:16 AM
 
As the subject line suggests I'm a command line noob.

I'm curious, what shell do the seasoned vets prefer? I've been dabbling with bash and tcsh but, with my limited knowledge, I notice little difference.

Thanks.
     
utidjian
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Jan 11, 2005, 12:14 PM
 
Most people prefer, as with so many things, the shell they are most familiar with.

I prefer bash.
-DU-...etc...
     
art_director  (op)
Professional Poster
Join Date: Mar 2002
Location: Minneapolis, MN U.S.A.
Status: Offline
Reply With Quote
Jan 11, 2005, 04:55 PM
 
I suspected that would be the answer.

Thanks.
     
Gavin
Mac Elite
Join Date: Oct 2000
Location: Seattle
Status: Offline
Reply With Quote
Jan 12, 2005, 08:38 AM
 
For basic 'type a line into the terminal' stuff you won't see much difference at all.

some shells have ways to get around and edit a line easily. jump to the end, delete the previous word, etc. You really won't use this unless you really get into it hard core.

the main differences I've found are in writing scripts: setting and showing vars and syntax for looping, ifs, etc. Some are more c like and some remind me of pascal (if I remember right)

try writing the same script in 2 or three shells and go with whatever seems more intuitive to you. If you are not writing scripts then it doesn't matter which one you use.
( Last edited by Gavin; Jan 12, 2005 at 08:54 AM. )
     
art_director  (op)
Professional Poster
Join Date: Mar 2002
Location: Minneapolis, MN U.S.A.
Status: Offline
Reply With Quote
Jan 12, 2005, 10:14 AM
 
Thanks for the reply, Gavin.

In the short term I won't be writing any scripts. I'm feeling my way through things and getting accustomed to and comfortable with the environment(s) and commands. Eventually I would like to begin scripting.
     
Phil Sherry
Dedicated MacNNer
Join Date: Nov 2004
Location: Stockholm, Sweden
Status: Offline
Reply With Quote
Jan 12, 2005, 10:27 AM
 
Originally posted by art_director:
In the short term I won't be writing any scripts. I'm feeling my way through things and getting accustomed to and comfortable with the environment(s) and commands. Eventually I would like to begin scripting.
given that OS X now uses bash instead of tcsh, you may as well just roll with bash. any 10.3 books on the subject will be using bash, so it makes sense.
     
larkost
Mac Elite
Join Date: Oct 1999
Location: San Jose, Ca
Status: Offline
Reply With Quote
Jan 12, 2005, 11:31 AM
 
I like the defaults on the zsh shell a bit better (it keep tends to be setup the same no matter the platform... there are big differences in the default bash UI setup between linux MacOS X, and FreeBSD). But I wind up doing most of my shell programming in bash (it is nearly everywhere with a fairly stable shell environment).
     
utidjian
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Jan 12, 2005, 01:17 PM
 
If you do decide to use bash you may find these links useful:

http://www.tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/index.html
http://www.tldp.org/LDP/abs/html/index.html

I would read them in the order listed. Those HOWTOs were written for Linux but they apply to all bash shells on whatever platform.

If you end up doing much work with the shell (any shell) the "killer app"(TM) for much shell work is screen (see man screen for more info). screen is part of the standard install in Mac OS X for a while now.
-DU-...etc...
     
art_director  (op)
Professional Poster
Join Date: Mar 2002
Location: Minneapolis, MN U.S.A.
Status: Offline
Reply With Quote
Jan 12, 2005, 04:36 PM
 
Thanks for the reply Phil.

To date I've been sticking with bash for that very reason.

The book that's helping me get my feet wet is 'Mac OS X Panther Unleashed'. It seems to be written for command line noobs like myself and does a smart job of walking you through the system.

Have any other suggestions?

My father is a programmer and is well-versed in Unix. He suggested I get 'Unix in a Nutshell'. He says it's a good bible to have at hand but it will be over my head for a spell.
     
art_director  (op)
Professional Poster
Join Date: Mar 2002
Location: Minneapolis, MN U.S.A.
Status: Offline
Reply With Quote
Jan 12, 2005, 04:38 PM
 
Thanks for your input, Larkost.

Sounds like I should concentrate on bash for the moment but I'm going to have a look at zsh when the time comes. Good to know what folks like and why.
     
art_director  (op)
Professional Poster
Join Date: Mar 2002
Location: Minneapolis, MN U.S.A.
Status: Offline
Reply With Quote
Jan 12, 2005, 04:39 PM
 
Thanks for the reply and the links, utidjian. Looks lie a treasure trove of helpful tutorials. My, I have my work cut out for me, eh?
     
nokq
Fresh-Faced Recruit
Join Date: Mar 2003
Status: Offline
Reply With Quote
Feb 7, 2005, 03:00 AM
 
If you get into bash, I suggest you learn the emacs style edit bindings. Comes in handy when you want to jump over to learning emacs (THE unix texteditor).

Cesar
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 04:45 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,