background.0.whatis.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml">
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6. <title>1. What is ... ? Unix, tcsh and AFNI &mdash; unix tutorial 0.1 documentation</title>
  7. <link rel="stylesheet" href="../_static/default.css" type="text/css" />
  8. <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
  9. <script type="text/javascript">
  10. var DOCUMENTATION_OPTIONS = {
  11. URL_ROOT: '../',
  12. VERSION: '0.1',
  13. COLLAPSE_INDEX: false,
  14. FILE_SUFFIX: '.html',
  15. HAS_SOURCE: true
  16. };
  17. </script>
  18. <script type="text/javascript" src="../_static/jquery.js"></script>
  19. <script type="text/javascript" src="../_static/underscore.js"></script>
  20. <script type="text/javascript" src="../_static/doctools.js"></script>
  21. <link rel="top" title="unix tutorial 0.1 documentation" href="../index.html" />
  22. <link rel="next" title="2. Opening a Terminal" href="background.1.terminal.html" />
  23. <link rel="prev" title="Unix Tutorial" href="../index.html" />
  24. </head>
  25. <body>
  26. <div class="related">
  27. <h3>Navigation</h3>
  28. <ul>
  29. <li class="right" style="margin-right: 10px">
  30. <a href="../genindex.html" title="General Index"
  31. accesskey="I">index</a></li>
  32. <li class="right" >
  33. <a href="background.1.terminal.html" title="2. Opening a Terminal"
  34. accesskey="N">next</a> |</li>
  35. <li class="right" >
  36. <a href="../index.html" title="Unix Tutorial"
  37. accesskey="P">previous</a> |</li>
  38. <li><a href="../index.html">unix tutorial 0.1 documentation</a> &raquo;</li>
  39. </ul>
  40. </div>
  41. <div class="document">
  42. <div class="documentwrapper">
  43. <div class="bodywrapper">
  44. <div class="body">
  45. <div class="section" id="what-is-unix-tcsh-and-afni">
  46. <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>
  47. <p>A brief overview of Unix, tcsh and AFNI</p>
  48. <blockquote>
  49. <div>Descriptions, examples, comments, sample commands, syntax and getting help...</div></blockquote>
  50. <div class="section" id="what-is-unix">
  51. <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>
  52. <p>Unix is a type of operating system (a standard), first developed in 1969</p>
  53. <p>Examples of Unix operating systems:</p>
  54. <blockquote>
  55. <div>Solaris, OpenSolaris, Irix, AIX, HP-UX, OS X, Linux, FreeBSD
  56. (actually, Linux and FreeBSD are not formally Unix, but are very similar)</div></blockquote>
  57. <p>Comments:</p>
  58. <blockquote>
  59. <div><ul class="simple">
  60. <li>has graphical environment, but strength is in command-line capabilities</li>
  61. <li>hundreds or more usually thousands of programs come with systems
  62. (not just a handful that have screen icons)</li>
  63. </ul>
  64. </div></blockquote>
  65. <div class="section" id="sample-commands">
  66. <h3>1.1.1. Sample commands<a class="headerlink" href="#sample-commands" title="Permalink to this headline">¶</a></h3>
  67. <p>A Unix system often has thousands of programs, including:</p>
  68. <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>
  69. </pre></div>
  70. </div>
  71. </div>
  72. <div class="section" id="syntax">
  73. <h3>1.1.2. Syntax<a class="headerlink" href="#syntax" title="Permalink to this headline">¶</a></h3>
  74. <p>Many characters special meanings on a Unix system, depending on the shell:</p>
  75. <div class="highlight-python"><pre>variables ($), quotes (', ", `), wildcards (\*, ?, []), pipes (|), redirection (&gt;)</pre>
  76. </div>
  77. </div>
  78. <div class="section" id="getting-help">
  79. <h3>1.1.3. Getting help<a class="headerlink" href="#getting-help" title="Permalink to this headline">¶</a></h3>
  80. <p>There are many places to get help...</p>
  81. <blockquote>
  82. <div><ul>
  83. <li><p class="first">&#8216;man&#8217; is short for manual, the on-line manual for unix commands:</p>
  84. <div class="highlight-python"><pre>man ls
  85. man less
  86. man man</pre>
  87. </div>
  88. </li>
  89. <li><p class="first">&#8216;info&#8217; is a newer help system</p>
  90. </li>
  91. <li><p class="first">books, having one that also covers shell programming can be helpful
  92. (in our case, the focus is on tcsh rather than bash)</p>
  93. </li>
  94. <li><p class="first">our on-line tutorials</p>
  95. </li>
  96. <li><p class="first">examples with the class data</p>
  97. </li>
  98. <li><p class="first">our message board</p>
  99. </li>
  100. <li><p class="first">asking neighbors</p>
  101. </li>
  102. </ul>
  103. </div></blockquote>
  104. </div>
  105. </div>
  106. <div class="section" id="what-is-tcsh">
  107. <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>
  108. <p>T-shell is a Unix shell: a command-line interpreter</p>
  109. <blockquote>
  110. <div><p>When the user types a command and hits &lt;Enter&gt;, the shell
  111. processes that command and decides what to do:</p>
  112. <blockquote>
  113. <div><ul class="simple">
  114. <li>processes special characters</li>
  115. <li>decides what program to run, if any</li>
  116. <li>runs the program, passing along any options and parameters</li>
  117. </ul>
  118. </div></blockquote>
  119. </div></blockquote>
  120. <p>Examples of similar shell programs:</p>
  121. <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>
  122. </pre></div>
  123. </div>
  124. <div class="admonition note">
  125. <p class="first admonition-title">Note</p>
  126. <p>regarding <strong class="command">tcsh</strong></p>
  127. <ul class="last simple">
  128. <li>it is just one of many common Unix programs</li>
  129. <li>the actual program (a file on disk) is generally /bin/tcsh</li>
  130. <li>it has its own syntax</li>
  131. <li>it has its own sub-commands (cd, echo, set, ...)</li>
  132. <li>it is not has powerful as bash, but is more simple and readable</li>
  133. </ul>
  134. </div>
  135. <div class="section" id="id1">
  136. <h3>1.2.1. Sample commands<a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
  137. <p>tcsh has many sub-commands: commands that do not exist on the system,
  138. but are just part of the shell, e.g.:</p>
  139. <div class="highlight-python"><pre>cd, echo, set, setenv, alias, foreach, while, bg, exit, ...</pre>
  140. </div>
  141. <p>For example, &#8216;cd&#8217; is not a program, it just tells the shell that you want
  142. to be &#8220;sitting in a new location&#8221;.</p>
  143. <p>Syntax (characters that mean something special):</p>
  144. <div class="highlight-python"><pre>home directories (~), history (!), jobs (%), redirecting stderr (&amp;gt;&amp;amp;)</pre>
  145. </div>
  146. </div>
  147. <div class="section" id="id2">
  148. <h3>1.2.2. Getting help<a class="headerlink" href="#id2" title="Permalink to this headline">¶</a></h3>
  149. <p>Since &#8216;tcsh&#8217; is just a Unix program, &#8220;man tcsh&#8221; is one way to get help.:</p>
  150. <div class="highlight-python"><pre>man tcsh</pre>
  151. </div>
  152. <p>Again, consider getting a book that covers tcsh.</p>
  153. </div>
  154. </div>
  155. <div class="section" id="what-is-afni">
  156. <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>
  157. <blockquote>
  158. <div><ul class="simple">
  159. <li>AFNI is a suite of data analysis and viewing tools</li>
  160. <li>well over 500 programs, scripts and plugins</li>
  161. </ul>
  162. </div></blockquote>
  163. <p>Examples of similar packages (there are many):</p>
  164. <blockquote>
  165. <div><ul class="simple">
  166. <li>AFNI, FSL, SPM, BrainVoyager</li>
  167. </ul>
  168. </div></blockquote>
  169. <div class="admonition note">
  170. <p class="first admonition-title">Note</p>
  171. <p>regarding <strong>AFNI</strong></p>
  172. <ul class="last simple">
  173. <li>it is good for viewing (and hopefully understanding) data</li>
  174. <li>it is written on top of X11 and for Unix systems</li>
  175. <li>it does not work directly on Windows (but there are options)</li>
  176. <li>it is free (costs nothing)</li>
  177. <li>it is open source (one can see and modify the code)</li>
  178. </ul>
  179. </div>
  180. <div class="section" id="id3">
  181. <h3>1.3.1. Sample commands<a class="headerlink" href="#id3" title="Permalink to this headline">¶</a></h3>
  182. <blockquote>
  183. <div><p>afni, suma, 3dcalc, afni_proc.py, 3dDeconvolve</p>
  184. <p>Syntax (characters that mean something special):</p>
  185. <div class="highlight-python"><pre>- sub-brick selection ([$,..]), range (&lt;&gt;), index ({}), transposition (')
  186. - many programs have their own special syntax</pre>
  187. </div>
  188. <div class="admonition note">
  189. <p class="first admonition-title">Note</p>
  190. <p class="last">The special syntax characters overlap with those of the shell,
  191. meaning they need to be hidden from the shell if they are to be
  192. passed on to an AFNI program.</p>
  193. </div>
  194. </div></blockquote>
  195. </div>
  196. <div class="section" id="id4">
  197. <h3>1.3.2. Getting help<a class="headerlink" href="#id4" title="Permalink to this headline">¶</a></h3>
  198. <blockquote>
  199. <div><p>Virtually every AFNI program provides help using the -help option, as in
  200. these examples:</p>
  201. <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>
  202. <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>
  203. <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>
  204. </pre></div>
  205. </div>
  206. <ul class="simple">
  207. <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>
  208. <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>
  209. <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>
  210. </ul>
  211. </div></blockquote>
  212. </div>
  213. </div>
  214. </div>
  215. </div>
  216. </div>
  217. </div>
  218. <div class="sphinxsidebar">
  219. <div class="sphinxsidebarwrapper">
  220. <h3><a href="../index.html">Table Of Contents</a></h3>
  221. <ul>
  222. <li><a class="reference internal" href="#">1. What is ... ? Unix, tcsh and AFNI</a><ul>
  223. <li><a class="reference internal" href="#what-is-unix">1.1. What is Unix?</a><ul>
  224. <li><a class="reference internal" href="#sample-commands">1.1.1. Sample commands</a></li>
  225. <li><a class="reference internal" href="#syntax">1.1.2. Syntax</a></li>
  226. <li><a class="reference internal" href="#getting-help">1.1.3. Getting help</a></li>
  227. </ul>
  228. </li>
  229. <li><a class="reference internal" href="#what-is-tcsh">1.2. What is tcsh?</a><ul>
  230. <li><a class="reference internal" href="#id1">1.2.1. Sample commands</a></li>
  231. <li><a class="reference internal" href="#id2">1.2.2. Getting help</a></li>
  232. </ul>
  233. </li>
  234. <li><a class="reference internal" href="#what-is-afni">1.3. What is AFNI?</a><ul>
  235. <li><a class="reference internal" href="#id3">1.3.1. Sample commands</a></li>
  236. <li><a class="reference internal" href="#id4">1.3.2. Getting help</a></li>
  237. </ul>
  238. </li>
  239. </ul>
  240. </li>
  241. </ul>
  242. <h4>Previous topic</h4>
  243. <p class="topless"><a href="../index.html"
  244. title="previous chapter">Unix Tutorial</a></p>
  245. <h4>Next topic</h4>
  246. <p class="topless"><a href="background.1.terminal.html"
  247. title="next chapter">2. Opening a Terminal</a></p>
  248. <h3>This Page</h3>
  249. <ul class="this-page-menu">
  250. <li><a href="../_sources/misc/background.0.whatis.txt"
  251. rel="nofollow">Show Source</a></li>
  252. </ul>
  253. <div id="searchbox" style="display: none">
  254. <h3>Quick search</h3>
  255. <form class="search" action="../search.html" method="get">
  256. <input type="text" name="q" />
  257. <input type="submit" value="Go" />
  258. <input type="hidden" name="check_keywords" value="yes" />
  259. <input type="hidden" name="area" value="default" />
  260. </form>
  261. <p class="searchtip" style="font-size: 90%">
  262. Enter search terms or a module, class or function name.
  263. </p>
  264. </div>
  265. <script type="text/javascript">$('#searchbox').show(0);</script>
  266. </div>
  267. </div>
  268. <div class="clearer"></div>
  269. </div>
  270. <div class="related">
  271. <h3>Navigation</h3>
  272. <ul>
  273. <li class="right" style="margin-right: 10px">
  274. <a href="../genindex.html" title="General Index"
  275. >index</a></li>
  276. <li class="right" >
  277. <a href="background.1.terminal.html" title="2. Opening a Terminal"
  278. >next</a> |</li>
  279. <li class="right" >
  280. <a href="../index.html" title="Unix Tutorial"
  281. >previous</a> |</li>
  282. <li><a href="../index.html">unix tutorial 0.1 documentation</a> &raquo;</li>
  283. </ul>
  284. </div>
  285. <div class="footer">
  286. &copy; Copyright 2015, rick reynolds.
  287. Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
  288. </div>
  289. </body>
  290. </html>