Michael,
thank you, this was a great idea, it definitely improved my quality of
life tremendously!
martin
Michael Hanke wrote:
> Hi,
>
> On Tue, Jul 10, 2007 at 02:17:09AM +0200, Martin M Monti wrote:
> <snip>
>
>> Following up on that, say that I do all of the above:
>> - create on e "master" .fsf file using the GUI with one of my subjects
>> - replace, in some text editor, filenames and # of TRs and create .fsf
>> files for all of the remaining subjects
>>
>
> I usually take the 'master' template approach. But instead of modifying
> it for each individual subject manually, I use this little script:
>
> ----------------------------
> #!/bin/sh
>
> if [ -z "$1" ]; then echo "No subject code specified." && exit 1; fi
> if [ -z "$2" ]; then echo "No template file specified." && exit 1; fi
>
> code=$1
> template=$2
> funcdir=func/raw
> featdir=feat
> suffix=
>
> if [ ! -z "$3" ]; then
> suffix="_$3"
> fi
>
> sed -e "s/###subj###/$1/" \
> -e "s/###tr###/$(avwval $funcdir/${1} dim4)/" \
> -e "s'###path###'$(pwd)'" \
> -e "s/###descr###/$suffix/" \
> < $template > $featdir/${code}${suffix}.fsf
> -----------------------------
>
> as you can see, I use the famous sed to replace some placeholders
> (###something###) with the correct values -- including the TR.
> I attached one of my templates.
>
>
> If there is an easier way to do this, I'd be very interested in it.
>
>
> Cheers,
>
> Michael
>
> --
> GPG key: 1024D/3144BE0F Michael Hanke
> http://apsy.gse.uni-magdeburg.de/hanke
> ICQ: 48230050
>
|