[Swift-user] Re: format of multi lined functions in SWIFT

Ben Clifford benc at hawaga.org.uk
Wed May 7 05:29:24 CDT 2008


> A typical script is multi lined and when in shell, we use "\".

The multilinedness you show in your example command-line looks like its 
only for readability.

I think you could equally well (behaviour wise) remove all the \newlines 
and have it all one line.

If so, then you don't need to pass any new line characters through to the 
app.

In Swift you can split parameters over multiple lines anyway, without 
needing any special separator character - the command is terminated when a 
; is reached.

So you can probably write something like this:

myapp "-jobs" "4" "-input"
"-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