04-26-2002
I don't need to use sed but I think I've managed to work out how to do it:
I believe the answer is
echo $string | grep '/./.'
It seems to work anyway. If anyone knows of a better way, please let me know.
Thanks
Helen
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
what is the format for grep if I want to search from the current directory and through all its subdirectories?:) (3 Replies)
Discussion started by: pkappaz
3 Replies
2. UNIX for Dummies Questions & Answers
Hello Everybody,
I have files; yyyymmdd.log which the data look like this;
"Txid=9426043&MsgTxt=Thankyou&UserId=john&Password=jh2501"
"Txid=9426150&MsgTxt=Thankyou&UserId=john&Password=jh2501"
.
.
.
"Txid=9426200&MsgTxt=Thankyou&UserId=john&Password=jh2501"
Question 1:
How to... (3 Replies)
Discussion started by: nazri76
3 Replies
3. Shell Programming and Scripting
hello people,
All my servers have 4 mounts with this norme. For example, if my hostname is siroe.
df -h | grep `hostname`
/dev/dsk/c1t3d0s6 404G 399G 800M 100% /siroe3
/dev/dsk/c1t2d0s6 404G 399G 800M 100% /siroe2
/dev/md/dsk/d6 20G 812M 19G ... (3 Replies)
Discussion started by: melanie_pfefer
3 Replies
4. UNIX for Dummies Questions & Answers
Instead of using the following command
#dmesg | grep -v sendmail | grep -v xntpd
How can I use just one grep -v and give both arguments.
Please suggest
thanks (4 Replies)
Discussion started by: Tirmazi
4 Replies
5. Shell Programming and Scripting
Hello,
Is there a way in grep to remember patterns?
For eg: int a,b,c,d,a;
If a variable is declared twice, like in the previous example, I should be able to print only those lines.
Is there a way to print only the lines where the variable name occurs more than once, using grep... (1 Reply)
Discussion started by: prasanna1157
1 Replies
6. Shell Programming and Scripting
i have files with "DOMAINSOLVER ACMS" with any number of spaces in between the two words on its own line and i can find it with the following:
grep -c "DOMAINSOLVER* ACMS" $FILENAMEbut i need to exclude any lines matching: "$DOMAINSOLVER". i've tried a variety of quoting and escaping with no luck.... (4 Replies)
Discussion started by: crimso
4 Replies
7. Shell Programming and Scripting
can anyone tell me what the \/$ means? from
grep \/$ (8 Replies)
Discussion started by: Nick1097
8 Replies
8. Shell Programming and Scripting
is there anyway i can ask grep to only get the first line?
as in the top command line
line 1 <-- just grep this line
line 2
line 3
---------- Post updated at 04:24 PM ---------- Previous update was at 04:19 PM ----------
nvm.. found out that i can do it with
|head (12 Replies)
Discussion started by: Nick1097
12 Replies
9. UNIX for Dummies Questions & Answers
Hello all,
I'm trying to grep the string "scott" from all files whose names are like srvr*.log and that were created "Nov 15"...I'm trying the following command but throws an error message...seems like the syntax is incorrect..
grep scott < ls -l srvr*.log|grep "Nov 15"
Thanks for your... (9 Replies)
Discussion started by: luft
9 Replies
10. UNIX for Dummies Questions & Answers
My grep returns a row of data like this:
75=20130130;60=074338;61=985;511=55473883;452=115439;62=196;267=1;
Is there a way for the grep to only return 60="something" and 511="something" ?
Thanks in advance. (10 Replies)
Discussion started by: Carl2013
10 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)