Bash/tcsh syntax differences
From SPCTools
(Difference between revisions)
Revision as of 22:34, 22 January 2009 Tfarrah (Talk | contribs) ← Previous diff |
Current revision Tfarrah (Talk | contribs) (→setting environment variables) |
||
Line 4: | Line 4: | ||
$ export $PIPELINE | $ export $PIPELINE | ||
tcsh: | tcsh: | ||
- | $ '''set''' PIPELINE=/net/db/projects/PeptideAtlas/pipeline | + | $ '''setenv''' PIPELINE=/net/db/projects/PeptideAtlas/pipeline |
=== conditional === | === conditional === |
Current revision
[edit]
setting environment variables
bash:
$ PIPELINE=/net/db/projects/PeptideAtlas/pipeline $ export $PIPELINE
tcsh:
$ setenv PIPELINE=/net/db/projects/PeptideAtlas/pipeline
[edit]
conditional
bash:
$ if [ -e <filename> ] then <action1>; else <action2>; fi
tcsh:
$ if ( -e <filename> ) then <action1>; else <action2>; endif
[edit]
for loop
bash:
$ for fn in *; do <action>; done
tcsh:
$ foreach fn (*) <action>; end