<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://docs.uabgrid.uab.edu/w/index.php?action=history&amp;feed=atom&amp;title=Unix_shortcuts</id>
	<title>Unix shortcuts - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://docs.uabgrid.uab.edu/w/index.php?action=history&amp;feed=atom&amp;title=Unix_shortcuts"/>
	<link rel="alternate" type="text/html" href="https://docs.uabgrid.uab.edu/w/index.php?title=Unix_shortcuts&amp;action=history"/>
	<updated>2026-06-10T15:50:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.38.2</generator>
	<entry>
		<id>https://docs.uabgrid.uab.edu/w/index.php?title=Unix_shortcuts&amp;diff=4866&amp;oldid=prev</id>
		<title>Demet@uab.edu: Created page with &quot;Unix scripting will save you time in the long run.  Really!  To do the same command, like zcore, for example, on a bunch of ﬁles, doing this in the command  line, use a comm...&quot;</title>
		<link rel="alternate" type="text/html" href="https://docs.uabgrid.uab.edu/w/index.php?title=Unix_shortcuts&amp;diff=4866&amp;oldid=prev"/>
		<updated>2014-11-06T18:36:58Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;Unix scripting will save you time in the long run.  Really!  To do the same command, like zcore, for example, on a bunch of ﬁles, doing this in the command  line, use a comm...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Unix scripting will save you time in the long run.  Really!&lt;br /&gt;
&lt;br /&gt;
To do the same command, like zcore, for example, on a bunch of ﬁles, doing this in the command &lt;br /&gt;
line, use a command like this: &lt;br /&gt;
for i in `ls -1 *.nii`; do echo $i; zscore.pl -i $i;  done &lt;br /&gt;
More complicated versions in a script: &lt;br /&gt;
ext=’gz’ &lt;br /&gt;
log=/dev/null; for i in `ls -1 *.$ext 2&amp;gt;$log`; do NAME=`basename $i .$ext`; echo “File: $NAME” ;echo “Moving &lt;br /&gt;
$NAME.$ext to $NAME.$newext”; done &lt;br /&gt;
&lt;br /&gt;
if you want to do more complicated things, changing names, for example, resort to perl. &lt;br /&gt;
also, FYI, you can run a perl command in a single line on the command line. This is good for regular expression &lt;br /&gt;
matching: &lt;br /&gt;
name=`echo $FILENAME | perl -p -e ’s/(.+)\.gz/$1/i’`&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=2&amp;amp;ved=0CBwQFjAB&amp;amp;url=http%3A%2F%2Fwww.ocf.berkeley.edu%2F~keyvan%2FUNIXquickref.pdf&amp;amp;rct=j&amp;amp;q=unix+quick+reference&amp;amp;ei=MwscTIHsB4K78gb588CyDA&amp;amp;usg=AFQjCNF57EvNUAyYwAzIylP97hWwf61vWg Unix Quick Reference Guide]&lt;/div&gt;</summary>
		<author><name>Demet@uab.edu</name></author>
	</entry>
</feed>