Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikibooksThe Free Textbook Project
Search

C Shell Scripting/Setup

From Wikibooks, open books for an open world
<C Shell Scripting

Setting up your Environment

[edit |edit source]

The C shell executable file is calledcsh. Most Unix systems have this shell installed except if the system just has the essentials installed. C shell is not aPOSIX shell so if the system has only one shell is would most likely be aBourne shell. Easiest way to check if you have C shell is to run thewhich command and see if it returns the path to the csh file.

$which csh/bin/csh


The result will most likely be/bin/csh which is the standard location. If the command doesn't print out a path the executable is not installed and you will have to download and installed the executable.

Figuring out the version of the C shell should also be done. If the output of this command indicates that your shell is an old version, upgrading to a newer version may save some headaches later.

Simply run the command with the--version option.

$csh --versiontcsh 6.14.00 (Astron) 2005-03-25 (i386-apple-darwin) options wide,nls,dl,al,kan,sm,rh,color,filec


For example, Mac OS X 10.5.7 displaystcsh 6.14.00. It should not be surprising to find thetcsh executable masquerading as the oldercsh executable since its is backward compatible.

Linux

[edit |edit source]

Linux has many different methods to install applications. One way is theapt-get command.

$sudo apt-get install csh

Mac OS X

[edit |edit source]

Mac OS X should always have csh installed. But you may want to get an editor such asTextMate to color the syntax.

Retrieved from "https://en.wikibooks.org/w/index.php?title=C_Shell_Scripting/Setup&oldid=3421010"
Category:

[8]ページ先頭

©2009-2025 Movatter.jp