[Swift-user] format of multi lined functions in SWIFT
Uri Hasson
uhasson at uchicago.edu
Tue May 6 17:43:13 CDT 2008
Hello all,
I would like to use SWIFT as a wrapper for a deconvolution
software we use.
A typical script is multi lined and when in shell, we use "\".
If I wanted to define a deconvolve function in swift, I would
want to pass to it 12 parameters. Should give a carriage
return at the end of each line, use "\", or any other escape
character?
() my function () {
app {
line 1
continue line 1
end line 1
}
}
Here is how the command line looks in a shell script:
3dDeconvolve -jobs 4 -input
$input_dir/runs_temp/scaled_run-$counter+orig -polort 3
-num_stimts 12 \
-stim_file 1 $current_dir/$x'[0]' -stim_label 1 classaction \
-stim_file 2 $current_dir/$x'[1]' -stim_label 2 verifyaction \
-stim_file 3 $current_dir/$x'[2]' -stim_label 3 classobj \
-stim_file 4 $current_dir/$x'[3]' -stim_label 4 verifyobj \
-stim_file 5 $current_dir/$x'[4]' -stim_label 5 testclass \
-stim_file 6 $current_dir/$x'[5]' -stim_label 6 testver \
-stim_file 7 $input_dir/runbyrun.motion.$counter'[1]'
-stim_base 7 -stim_label 7 roll \
-stim_file 8 $input_dir/runbyrun.motion.$counter'[2]'
-stim_base 8 -stim_label 8 pitch \
-stim_file 9 $input_dir/runbyrun.motion.$counter'[3]'
-stim_base 9 -stim_label 9 yaw \
-stim_file 10 $input_dir/runbyrun.motion.$counter'[4]'
-stim_base 10 -stim_label 10 dx \
-stim_file 11 $input_dir/runbyrun.motion.$counter'[5]'
-stim_base 11 -stim_label 11 dy \
-stim_file 12 $input_dir/runbyrun.motion.$counter'[6]'
-stim_base 12 -stim_label 12 dz \
-stim_maxlag 1 17 -stim_maxlag 2 17 -stim_maxlag 3 17
-stim_maxlag 4 17 -stim_maxlag 5 17 -stim_maxlag 6 17 \
-censor ./censor.prep/run"$counter".censor \
-tout -bout -nofullf_atall -nodmbase -xsave -nfirst 0 \
-iresp 1 classaction.irf.run$counter -iresp 2
verifyaction.irf.run$counter -iresp 3 classobj.irf.run$counter
-iresp 4 verifyobj.irf.run$counter \
-bucket Ss5.deconmean.reg1strunCensor.run_$counter
More information about the Swift-user
mailing list