123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302 |
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-
- <title>1. What is ... ? Unix, tcsh and AFNI — unix tutorial 0.1 documentation</title>
-
- <link rel="stylesheet" href="../_static/default.css" type="text/css" />
- <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
-
- <script type="text/javascript">
- var DOCUMENTATION_OPTIONS = {
- URL_ROOT: '../',
- VERSION: '0.1',
- COLLAPSE_INDEX: false,
- FILE_SUFFIX: '.html',
- HAS_SOURCE: true
- };
- </script>
- <script type="text/javascript" src="../_static/jquery.js"></script>
- <script type="text/javascript" src="../_static/underscore.js"></script>
- <script type="text/javascript" src="../_static/doctools.js"></script>
- <link rel="top" title="unix tutorial 0.1 documentation" href="../index.html" />
- <link rel="next" title="2. Opening a Terminal" href="background.1.terminal.html" />
- <link rel="prev" title="Unix Tutorial" href="../index.html" />
- </head>
- <body>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="../genindex.html" title="General Index"
- accesskey="I">index</a></li>
- <li class="right" >
- <a href="background.1.terminal.html" title="2. Opening a Terminal"
- accesskey="N">next</a> |</li>
- <li class="right" >
- <a href="../index.html" title="Unix Tutorial"
- accesskey="P">previous</a> |</li>
- <li><a href="../index.html">unix tutorial 0.1 documentation</a> »</li>
- </ul>
- </div>
- <div class="document">
- <div class="documentwrapper">
- <div class="bodywrapper">
- <div class="body">
-
- <div class="section" id="what-is-unix-tcsh-and-afni">
- <span id="u-misc-bg0"></span><h1>1. What is ... ? Unix, tcsh and AFNI<a class="headerlink" href="#what-is-unix-tcsh-and-afni" title="Permalink to this headline">¶</a></h1>
- <p>A brief overview of Unix, tcsh and AFNI</p>
- <blockquote>
- <div>Descriptions, examples, comments, sample commands, syntax and getting help...</div></blockquote>
- <div class="section" id="what-is-unix">
- <span id="u-mb0-unix"></span><h2>1.1. What is Unix?<a class="headerlink" href="#what-is-unix" title="Permalink to this headline">¶</a></h2>
- <p>Unix is a type of operating system (a standard), first developed in 1969</p>
- <p>Examples of Unix operating systems:</p>
- <blockquote>
- <div>Solaris, OpenSolaris, Irix, AIX, HP-UX, OS X, Linux, FreeBSD
- (actually, Linux and FreeBSD are not formally Unix, but are very similar)</div></blockquote>
- <p>Comments:</p>
- <blockquote>
- <div><ul class="simple">
- <li>has graphical environment, but strength is in command-line capabilities</li>
- <li>hundreds or more usually thousands of programs come with systems
- (not just a handful that have screen icons)</li>
- </ul>
- </div></blockquote>
- <div class="section" id="sample-commands">
- <h3>1.1.1. Sample commands<a class="headerlink" href="#sample-commands" title="Permalink to this headline">¶</a></h3>
- <p>A Unix system often has thousands of programs, including:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">ls</span><span class="p">,</span> <span class="n">cat</span><span class="p">,</span> <span class="n">less</span><span class="p">,</span> <span class="n">mv</span><span class="p">,</span> <span class="n">cp</span><span class="p">,</span> <span class="n">date</span><span class="p">,</span> <span class="n">ssh</span><span class="p">,</span> <span class="n">vi</span><span class="p">,</span> <span class="n">rm</span>
- </pre></div>
- </div>
- </div>
- <div class="section" id="syntax">
- <h3>1.1.2. Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
- <p>Many characters special meanings on a Unix system, depending on the shell:</p>
- <div class="highlight-python"><pre>variables ($), quotes (', ", `), wildcards (\*, ?, []), pipes (|), redirection (>)</pre>
- </div>
- </div>
- <div class="section" id="getting-help">
- <h3>1.1.3. Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h3>
- <p>There are many places to get help...</p>
- <blockquote>
- <div><ul>
- <li><p class="first">‘man’ is short for manual, the on-line manual for unix commands:</p>
- <div class="highlight-python"><pre>man ls
- man less
- man man</pre>
- </div>
- </li>
- <li><p class="first">‘info’ is a newer help system</p>
- </li>
- <li><p class="first">books, having one that also covers shell programming can be helpful
- (in our case, the focus is on tcsh rather than bash)</p>
- </li>
- <li><p class="first">our on-line tutorials</p>
- </li>
- <li><p class="first">examples with the class data</p>
- </li>
- <li><p class="first">our message board</p>
- </li>
- <li><p class="first">asking neighbors</p>
- </li>
- </ul>
- </div></blockquote>
- </div>
- </div>
- <div class="section" id="what-is-tcsh">
- <span id="u-mb0-tcsh"></span><h2>1.2. What is tcsh?<a class="headerlink" href="#what-is-tcsh" title="Permalink to this headline">¶</a></h2>
- <p>T-shell is a Unix shell: a command-line interpreter</p>
- <blockquote>
- <div><p>When the user types a command and hits <Enter>, the shell
- processes that command and decides what to do:</p>
- <blockquote>
- <div><ul class="simple">
- <li>processes special characters</li>
- <li>decides what program to run, if any</li>
- <li>runs the program, passing along any options and parameters</li>
- </ul>
- </div></blockquote>
- </div></blockquote>
- <p>Examples of similar shell programs:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">sh</span><span class="p">,</span> <span class="n">bash</span><span class="p">,</span> <span class="n">csh</span><span class="p">,</span> <span class="n">tcsh</span><span class="p">,</span> <span class="n">ksh</span><span class="p">,</span> <span class="n">zsh</span>
- </pre></div>
- </div>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p>regarding <strong class="command">tcsh</strong></p>
- <ul class="last simple">
- <li>it is just one of many common Unix programs</li>
- <li>the actual program (a file on disk) is generally /bin/tcsh</li>
- <li>it has its own syntax</li>
- <li>it has its own sub-commands (cd, echo, set, ...)</li>
- <li>it is not has powerful as bash, but is more simple and readable</li>
- </ul>
- </div>
- <div class="section" id="id1">
- <h3>1.2.1. Sample commands<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
- <p>tcsh has many sub-commands: commands that do not exist on the system,
- but are just part of the shell, e.g.:</p>
- <div class="highlight-python"><pre>cd, echo, set, setenv, alias, foreach, while, bg, exit, ...</pre>
- </div>
- <p>For example, ‘cd’ is not a program, it just tells the shell that you want
- to be “sitting in a new location”.</p>
- <p>Syntax (characters that mean something special):</p>
- <div class="highlight-python"><pre>home directories (~), history (!), jobs (%), redirecting stderr (&gt;&amp;)</pre>
- </div>
- </div>
- <div class="section" id="id2">
- <h3>1.2.2. Getting help<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
- <p>Since ‘tcsh’ is just a Unix program, “man tcsh” is one way to get help.:</p>
- <div class="highlight-python"><pre>man tcsh</pre>
- </div>
- <p>Again, consider getting a book that covers tcsh.</p>
- </div>
- </div>
- <div class="section" id="what-is-afni">
- <span id="u-mb0-afni"></span><h2>1.3. What is AFNI?<a class="headerlink" href="#what-is-afni" title="Permalink to this headline">¶</a></h2>
- <blockquote>
- <div><ul class="simple">
- <li>AFNI is a suite of data analysis and viewing tools</li>
- <li>well over 500 programs, scripts and plugins</li>
- </ul>
- </div></blockquote>
- <p>Examples of similar packages (there are many):</p>
- <blockquote>
- <div><ul class="simple">
- <li>AFNI, FSL, SPM, BrainVoyager</li>
- </ul>
- </div></blockquote>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p>regarding <strong>AFNI</strong></p>
- <ul class="last simple">
- <li>it is good for viewing (and hopefully understanding) data</li>
- <li>it is written on top of X11 and for Unix systems</li>
- <li>it does not work directly on Windows (but there are options)</li>
- <li>it is free (costs nothing)</li>
- <li>it is open source (one can see and modify the code)</li>
- </ul>
- </div>
- <div class="section" id="id3">
- <h3>1.3.1. Sample commands<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
- <blockquote>
- <div><p>afni, suma, 3dcalc, afni_proc.py, 3dDeconvolve</p>
- <p>Syntax (characters that mean something special):</p>
- <div class="highlight-python"><pre>- sub-brick selection ([$,..]), range (<>), index ({}), transposition (')
- - many programs have their own special syntax</pre>
- </div>
- <div class="admonition note">
- <p class="first admonition-title">Note</p>
- <p class="last">The special syntax characters overlap with those of the shell,
- meaning they need to be hidden from the shell if they are to be
- passed on to an AFNI program.</p>
- </div>
- </div></blockquote>
- </div>
- <div class="section" id="id4">
- <h3>1.3.2. Getting help<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
- <blockquote>
- <div><p>Virtually every AFNI program provides help using the -help option, as in
- these examples:</p>
- <div class="highlight-python"><div class="highlight"><pre><span class="n">afni_proc</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">help</span>
- <span class="n">afni_proc</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">help</span> <span class="o">|</span> <span class="n">less</span>
- <span class="n">afni_proc</span><span class="o">.</span><span class="n">py</span> <span class="o">-</span><span class="n">h_view</span>
- </pre></div>
- </div>
- <ul class="simple">
- <li>this output is also available at: <a class="reference external" href="http://afni.nimh.nih.gov/pub/dist/doc/program_help">help: all AFNI programs</a></li>
- <li>course material is available at: <a class="reference external" href="http://afni.nimh.nih.gov/pub/dist/edu/latest/afni_handouts">help: course handouts</a></li>
- <li>class data is available at: <a class="reference external" href="http://afni.nimh.nih.gov/pub/dist/edu/data">AFNI data packages</a></li>
- </ul>
- </div></blockquote>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="sphinxsidebar">
- <div class="sphinxsidebarwrapper">
- <h3><a href="../index.html">Table Of Contents</a></h3>
- <ul>
- <li><a class="reference internal" href="#">1. What is ... ? Unix, tcsh and AFNI</a><ul>
- <li><a class="reference internal" href="#what-is-unix">1.1. What is Unix?</a><ul>
- <li><a class="reference internal" href="#sample-commands">1.1.1. Sample commands</a></li>
- <li><a class="reference internal" href="#syntax">1.1.2. Syntax</a></li>
- <li><a class="reference internal" href="#getting-help">1.1.3. Getting help</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#what-is-tcsh">1.2. What is tcsh?</a><ul>
- <li><a class="reference internal" href="#id1">1.2.1. Sample commands</a></li>
- <li><a class="reference internal" href="#id2">1.2.2. Getting help</a></li>
- </ul>
- </li>
- <li><a class="reference internal" href="#what-is-afni">1.3. What is AFNI?</a><ul>
- <li><a class="reference internal" href="#id3">1.3.1. Sample commands</a></li>
- <li><a class="reference internal" href="#id4">1.3.2. Getting help</a></li>
- </ul>
- </li>
- </ul>
- </li>
- </ul>
- <h4>Previous topic</h4>
- <p class="topless"><a href="../index.html"
- title="previous chapter">Unix Tutorial</a></p>
- <h4>Next topic</h4>
- <p class="topless"><a href="background.1.terminal.html"
- title="next chapter">2. Opening a Terminal</a></p>
- <h3>This Page</h3>
- <ul class="this-page-menu">
- <li><a href="../_sources/misc/background.0.whatis.txt"
- rel="nofollow">Show Source</a></li>
- </ul>
- <div id="searchbox" style="display: none">
- <h3>Quick search</h3>
- <form class="search" action="../search.html" method="get">
- <input type="text" name="q" />
- <input type="submit" value="Go" />
- <input type="hidden" name="check_keywords" value="yes" />
- <input type="hidden" name="area" value="default" />
- </form>
- <p class="searchtip" style="font-size: 90%">
- Enter search terms or a module, class or function name.
- </p>
- </div>
- <script type="text/javascript">$('#searchbox').show(0);</script>
- </div>
- </div>
- <div class="clearer"></div>
- </div>
- <div class="related">
- <h3>Navigation</h3>
- <ul>
- <li class="right" style="margin-right: 10px">
- <a href="../genindex.html" title="General Index"
- >index</a></li>
- <li class="right" >
- <a href="background.1.terminal.html" title="2. Opening a Terminal"
- >next</a> |</li>
- <li class="right" >
- <a href="../index.html" title="Unix Tutorial"
- >previous</a> |</li>
- <li><a href="../index.html">unix tutorial 0.1 documentation</a> »</li>
- </ul>
- </div>
- <div class="footer">
- © Copyright 2015, rick reynolds.
- Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
- </div>
- </body>
- </html>
|