12-06-2010
1. Why do you want to do that?
2. What do you mean with "invert" ?
3. You cannot change the parameter expansion syntax
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
2. Shell Programming and Scripting
I am attempting to replace positions 44-46 with YYY if positions 48-50 = XXX.
awk -F "" '{if (substr($0,48,3)=="XXX") $44="YYY"}1' OFS="" $filename > $tempfile
But this is not working, 44-46 is still spaces in my tempfile instead of YYY. Any suggestions would be greatly appreciated. (9 Replies)
Discussion started by: halplessProblem
9 Replies
3. Shell Programming and Scripting
Hi!
i'm trying to parse textfiles against a pattern and storing the result in a variable.
The strings i want to get are embraced by and can occur several times in one line, so e.g.
some text anything else endwhat i have so far:
#!/bin/bash
for f in $*
do
exec 3<&0
exec 0<$f
... (2 Replies)
Discussion started by: thoni
2 Replies
4. Shell Programming and Scripting
Hi ,
I have a binary in a variable and i want to invert it and store in a new variable. i mean, replace 0 with 1 and vice versa. I tried reading character by character with the below script but it didnt provide me the proper result.
#!/bin/bash
count=1
var1="00100011"
while ]
do
... (4 Replies)
Discussion started by: srinivasayedla
4 Replies
5. Shell Programming and Scripting
I have got an Perl array like:
@array = (1,2,3,4,5,6,1,2,3,4,1,2,1,2,3,4,5,6,7,8,9...............)
This numeric sequence will be always sequentially increasing, unless it encounters, The beginning of the new sequentially increasing numeric sequence.
SO in this array we get sequentially... (5 Replies)
Discussion started by: teknokid1
5 Replies
6. Shell Programming and Scripting
I need to replace dashes (i.e. -) if present from positions 351-357 with zero (i.e. 0), I also need to replace dash (i.e “-“) if present between position 024-043 with zero (i.e. 0) & I replace " " (i.e. 2 space characters) if present at position 381-382 with "04". Total length of record is 413.... (11 Replies)
Discussion started by: lancesunny
11 Replies
7. Shell Programming and Scripting
I have an application(Minecraft Server) that generates a logfile live. Using Crontab and screen I send a 'list' command every minute.
Sample Log view:
2013-06-07 19:14:37 <Willrocksyea1> hello*
2013-06-07 19:14:41 <Gromden29> hey
2013-06-07 19:14:42 Gromden29 lost connection:... (1 Reply)
Discussion started by: gatekeeper258
1 Replies
8. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
9. Shell Programming and Scripting
I have a file
Line 1 a
Line 22
Line 33
Line 1 b
Line 22
Line 1 c
Line 4
Line 5
I want to delete all lines before last occurrence of a line which contains something which is defined in a variable. Say a variable var contains 'Line 1', then I need the following in the output.
... (21 Replies)
Discussion started by: Soham
21 Replies
LEARN ABOUT DEBIAN
warptensorimagemultitransform
WARPTENSORIMAGEMULTITRANSFORM(1) User Commands WARPTENSORIMAGEMULTITRANSFORM(1)
NAME
WarpTensorImageMultiTransform - part of ANTS registration suite
DESCRIPTION
WarpImageMultiTransform ImageDimension moving_image output_image [-R reference_image | --tightest-bounding-box] (--reslice-by-header)
[--use-NN (use Nearest Neighbor Interpolator)][--ANTS-prefix prefix-name | --ANTS-prefix-invert prefix-name] {[deformation_field | [-i]
affine_transform_txt | --Id | [-i] --moving-image-header / -mh | [-i] --reference-image-header / -rh]} Example: Reslice the image: WarpIm-
ageMultiTransform 3 Imov.nii Iout.nii --tightest-bounding-box --reslice-by-header Reslice the image to a reference image: WarpImageMulti-
Transform 3 Imov.nii Iout.nii -R Iref.nii --tightest-bounding-box --reslice-by-header Note: -i will use the inversion of the following
affine transform. --tightest-bounding-box will be overrided by -R reference_image if given. It computes the tightest bounding box using
all the affine transformations. --Id uses the identity transform. --moving-image-header or -mh in short will use the orientation header
of the moving image file. This is typically not used with --reslice-by-header. --reference-image-header or -rh in short will use the ori-
entation header of the fixed image file. This is typically not used with --reslice-by-header. --reslice-by-header 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. --reslice-by-header is equvalient to -i -mh, or -fh -i -mh if used together with -R.
For ANTS users: To use with the deformation field and the affine transform files generated from ANTS: --ANTS-prefix prefix-name --ANTS-pre-
fix-invert prefix-name Example: 3 moving_image output_image -R reference_image --ANTS-prefix abcd.nii.gz Applies abcdWarpxvec.nii.gz/abcd-
Warpyvec.nii.gz/abcdWarpzvec.nii.gz and then abcdAffine.txt. Use this with ANTS to get the moving_image warped into the reference_image
domain. 3 reference_image output_image -R moving_image --ANTS-prefix-invert abcd.nii.gz --ANTS-invert Applies the inversion of
abcdAffine.txt and then abcdInverseWarpxvec.nii.gz/abcdInverseWarpyvec.nii.gz/abcdInverseWarpzvec.nii.gz. Use this with ANTS to get the
reference_image warped into the moving_image domain. Note: prefix name "abcd" without any extension will use ".nii.gz" by default
WarpTensorImageMultiTransform 1.9 May 2012 WARPTENSORIMAGEMULTITRANSFORM(1)