I work in Ubuntu 16.04, I am new to Bash and something is wrong with my script, please help.
I have a few hundreds of subjects data (like subj003.nii.gz, subj012.nii.gz etc. up to subj567.nii.gz) in a directory /usr/afewmoredirectories/subjects.
I may run for each subject a command like
which runs without error.
Instead I try to automatize the process. So I create two files:
In the list.txt I have a column of all the subject id (like subj003, subj012 etc. up to subj567)
In the doit.sh I have 2 lines:
Then I execute in the root terminal
and something is wrong because instead of running the commands the output is:
Could you please explain me what I is wrong?
Hi,
I am getting different output for grep depending which directory I am in.
The following is a transcript of my session, I am using egrep but have also used grep -E. The directory names have been changed for security:
$pwd
/dir1/dir2/dir3/dir4
$echo 000000 |egrep -v
$echo $?
1
$cd ..... (10 Replies)
I had a similar script in solaris and it had no problem. I wrote this one in freeBSD and it gave me strange output. Can anyone please tell me why? thanks a lot
#!/bin/sh
#This is a shell script that checks file system capacity mounted on /home directory
#If file system is over 90% capacity,... (1 Reply)
Hi!
My system seems to going crazy... Yesterday it flushes some settings, some settings it leave... I can't find the link between the settings it had reset: some of these settings I made two days ago and system was working fine and some more than a month ago. System's log says nothing. Moreover,... (2 Replies)
Howdy all, I have a scritp that does a sqldump. But for some goofy reason, a certain part of it behaves uber strange.
It does a daily dump of my sql, according to parameters I enter in hardcode.
The script is:
#!/bin/bash
APP_NAME="app_com_site"
wikiname="wiki_com_site"
... (8 Replies)
It is so till login screen. I mean that when I boot my computer, Ubuntu shows a splash screen with mouse instead of Ubuntu logo and in the login screen it shows XUbuntu login screen... It began when I upgraded to previous kernel, I suppose, but I'm not sure... I can't say that it annoys me very... (6 Replies)
Hi
At OK> prompt, I have run the boot -s command
After system is coming on to multiuser state, when I run the " who -r" command, I get the following message
# who -r
run-level Oct 17 03:48 last=
Means I dont see "S" after run-level keyword. Could any one... (2 Replies)
Can someone please explain why I get two outputs with the du command? The first one gave me one. I also didn't ask for the second directory so why did it give that directory?
$ du -h "/media/Part 1/Desktop/playlist"
775M /media/Part 1/Desktop/playlist
$ du -h "/media/Part... (1 Reply)
Hi, although I am not expert in bash, so please forgive me if this is silly, I think that this is strange:
I have this command:
find . -type f -print0 |xargs -0 grep -i -e 'some rexp'
and it works fine. But when I create a bash script (on cygwin) to run this command, there is no output !!!... (3 Replies)
How can I prevent find from outputting the directory name /home/xxxxxxxx/Backup/.system (which isn't even "other writable"?
I am trying to search for files that are "world writable" on a shared web host using the find statement, and I want to prevent find from creating an error (because the of... (4 Replies)
Hi,
Kindly help me to understand the behavior or logic of the below shell command
$ echo $!#
echo $echo $
$
$ echo !$#
echo $#
0
I am using GNU bash, version 3.2.25(1)-release (2 Replies)
Discussion started by: royalibrahim
2 Replies
LEARN ABOUT DEBIAN
warpimagemultitransform
WARPIMAGEMULTITRANSFORM(1) User Commands WARPIMAGEMULTITRANSFORM(1)NAME
WarpImageMultiTransform - part of ANTS registration suite
DESCRIPTION
Usage:
./WarpImageMultiTransform ImageDimension moving_image output_image -R reference_image --use-NN SeriesOfTransformations--(See Below)
SeriesOfTransformations --- ./WarpImageMultiTransform can apply, via concatenation, an unlimited number of transformations to your
data . Thus, SeriesOfTransformations may be an Affine transform followed by a warp another affine and then another warp.
Inverse affine transformations are invoked by calling
-i MyAffine.txt
InverseWarps are invoked by passing the InverseWarp.nii.gz
filename (see below for a note about this).
Example 1: Mapping a warped image into the reference_image domain by applying abcdWarpxvec.nii.gz/abcdWarpyvec.nii.gz/abcd-
Warpzvec.nii.gz and then abcdAffine.txt
./WarpImageMultiTransform 3 moving_image output_image -R reference_image abcdWarp.nii.gz abcdAffine.txt
Example 2: To map the fixed/reference_image warped into the moving_image domain by applying the inversion of abcdAffine.txt and then
abcdInverseWarpxvec.nii.gz/abcdInverseWarpyvec.nii.gz/abcdInverseWarpzvec.nii.gz .
./WarpImageMultiTransform 3 reference_image output_image -R moving_image -i abcdAffine.txt abcdInverseWarp.nii.gz
Note that the inverse maps (Ex. 2) are passed to this program in the reverse order of the forward maps (Ex. 1).
This makes sense, geometrically ... see ANTS.pdf for visualization of this syntax.
Compulsory arguments:
ImageDimension: 2 or 3 (for 2 or 3 Dimensional registration)
moving_image: the image to apply the transformation to
output_image: the resulting image
Optional arguments:
-R: reference_image space that you wish to warp INTO.
--tightest-bounding-box: Computes the tightest bounding box using all the affine transformations. It will be overrided by -R refer-
ence_image if given. --reslice-by-header: equivalient to -i -mh, or -fh -i -mh if used together with -R. It uses the orientation
matrix and origin encoded in the image file header. It can be used together with -R. This is typically not used together with any
other transforms.
--use-NN: Use Nearest Neighbor Interpolation.
--use-BSpline: Use 3rd order B-Spline Interpolation.
-i: will use the inversion of the following affine transform.
Other Example Usages: Reslice the image: WarpImageMultiTransform 3 Imov.nii.gz Iout.nii.gz --tightest-bounding-box
--reslice-by-header Reslice the image to a reference image: WarpImageMultiTransform 3 Imov.nii.gz Iout.nii.gz -R Iref.nii.gz
--tightest-bounding-box --reslice-by-header
Important Notes: Prefixname "abcd" without any extension will use ".nii.gz" by default The abcdWarp and abcdInverseWarp do not
exist. They are formed on the basis of abcd(Inverse)Warpxvec/yvec/zvec.nii.gz when calling ./WarpImageMultiTransform, yet you have
to use them as if they exist.
WarpImageMultiTransform 1.9 May 2012 WARPIMAGEMULTITRANSFORM(1)