Sponsored Content
Full Discussion: set command
Top Forums UNIX for Dummies Questions & Answers set command Post 30262 by Perderabo on Friday 18th of October 2002 04:13:21 PM
Old 10-18-2002
All you can do is turn noclobber on and off.
set -o noclobber # turn noclobber on
set +o noclobber # turn noclobber off
set -o # see all options

If noclobber is on a command like "echo hello > file" will fail if file already exists. You can overwrite the file anyway by using: "echo hello >| file". Or you can just turn off noclobber.

But the setting of noclobber will not suddenly give you extraordinary permission to write into unwritable files.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SET command

Hi Unixers, :) In a shell script i found the following statements mline='grep\^ 1111 emaster.dbf set -- $mline The first statement searches the emaster.dbf file for the code 1111 and ifit finds any such line it gets that line and stores it in mline. But iam getting little bit confusion with... (4 Replies)
Discussion started by: ravi raj kumar
4 Replies

2. Shell Programming and Scripting

how to use set command

i have a script in which i go to a particular dir and list all its file ------------------------------------------------------------------------ #!/bin/ksh if test -d systemProperties then set --`cd systemProperties` for i in * do echo "$i" >> lastm2.txt done fi... (2 Replies)
Discussion started by: ali560045
2 Replies

3. Shell Programming and Scripting

set command

Hi, I am new to unix and trying to learn shell scripting. I am using Redhat linux instead of unix and using Bash shell. I typed some code which consist of "set" command. I got the code from a book. The code is, set 'who am i' echo $name Actually the... (3 Replies)
Discussion started by: saravanakumar
3 Replies

4. UNIX for Dummies Questions & Answers

What is the set -o vi command for?

I have heard the following command and seen people using it at shell but I don't know what it is for and when it is used. I will appreciate any comment regarding the use of this command. set -o vi (2 Replies)
Discussion started by: agasamapetilon
2 Replies

5. Shell Programming and Scripting

set -x command

hi all, Please tell all the uses of set -x command. Also can you tell about other options which can be used with set command. Thanks:) sumit (3 Replies)
Discussion started by: sumit207
3 Replies

6. Shell Programming and Scripting

Set Command Help

Hi, I have following scenario.. set -e eval Command 1 eval Command 2 eval Command 3 gmake realclean but now the problem is I want to print an error message, advising user to run gmake realclean after resolving errors if any of the Command1/2/3 failed. I know I can use trap to do... (0 Replies)
Discussion started by: Shribigb
0 Replies

7. UNIX for Dummies Questions & Answers

When do we use set command

Hi all, Some clarification regarding the unix set command for ksh env. I read up the man pages, but ended up more blur. Eg. - Turns off -x and -v flags and stops examining argu- ments for flags. - Does not change any of the flags. This option is ... (1 Reply)
Discussion started by: srage
1 Replies

8. HP-UX

What is the use of command set -- and set - variable?

Hi, I am using hp unix i want to know the use of the following commands set -- set - variable thanks (4 Replies)
Discussion started by: gomathi
4 Replies

9. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

10. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies
MINCMATH(1)							 MINC User's Guide						       MINCMATH(1)

NAME
mincmath - perform simple math operations on minc files SYNOPSIS
mincmath [<options>] <in1>.mnc [<in2>.mnc...] <out>.mnc DESCRIPTION
Mincmath will perform simple, voxel-by-voxel math operations, on one or more minc files of the same shape and having the same coordinate sampling, producing a single output file. Operations can be unary (operate on one file), binary (two input files) or cumulative (operate on two or more input files). Cumulative operations can also be performed across a specified dimension of the input files. OPTIONS
Note that options can be specified in abbreviated form (as long as they are unique) and can be given anywhere on the command line. General options -2 Create a MINC 2.0 format output file. -clobber Overwrite an existing file. -noclobber Don't overwrite an existing file (default). -no_clobber Synonym for -noclobber. -verbose Print out progress information for each chunk of data copied (default). -quiet Do not print out progress information. -debug Print out debugging information. -filelist filename Specify a file containing a list of input file names. If "-" is given, then file names are read from the standard input. If this option is given, then there should be no input file names specified on the command line. Empty lines in the input file are ignored. -copy_header Copy all of the header information from the first input file (default for one input file). -nocopy_header Do not copy all of the header from the first input file; copy only coordinate information (default for more than one input file). -filetype Create an output file with the same type as the first input file (default). -byte Store output voxels in 8-bit integer format. -short Store output voxels in 16-bit integer format. -int Store output voxels in 32-bit integer format. -long Superseded by -int. -float Store output voxels in 32-bit floating point format. -double Store output voxels in 64-bit floating point format. -signed Use signed, two's complement integer format. Applies only if the output voxel type is specified to be an integer type (one of -byte, -short, -int or -long). -unsigned Use unsigned integer format. Applies only if the output voxel type is specified to be an integer type (one of -byte, -short, -int or -long). -range min max Restrict the valid range of integer data. Applies only if one of the -byte, -short, -int or -long options is specified. -max_buffer_size_in_kb size Specify the maximum size of the internal buffers (in kbytes). Default is 4096 (4MB). -dimension dimname Specify a dimension along which we wish to perform a cumulative operation. -check_dimensions Check that all input files have matching sampling in world dimensions (default). -nocheck_dimensions Ignore any differences in world dimensions sampling for input files . -propagate_nan Invalid data (Not-A-Number or NaN) at a voxel in any of the input files will produce invalid data in the output file at that voxel (default). -ignore_nan For cumulative operations, invalid data (NaN) in an input file is ignored, ie. treated as though it is not present. -nan When an illegal operation is attempted at a voxel (such as divide by zero), invalid data (NaN) is stored in the output file (default). Having no valid input data for a cumulative operation is also considered an illegal operation when -ignore_nan is used. -zero When an illegal operation is attempted at a voxel (such as divide by zero), value zero is stored in the output file. -illegal_value value When an illegal operation is attempted at a voxel (such as divide by zero), the specified value is stored in the output file. Options for specifying constants -constant value Specify a single constant. -const value Synonym for -constant. -const2 value1 value2 Specify two constants. Operations -add Cumulatively add two or more volumes, or add a volume and a constant. -sub Subtract two volumes or a volume minus a constant. -mult Cumulatively multiply two or more volumes, or multiply a volume and a constant. -div Divide two volumes or a volume divided by a constant. -invert Calculate 1/x at each voxel, where x is the input voxel value. If a constant c is specified (with -constant), then calculate c/x at each voxel. -sqrt Calculate the square root of a volume. -square Calculate the square of a volume. -abs Calculate the absolute value of a volume. -maximum Calculate the maximum of a series of volumes. -minimum Calculate the minimum of a series of volumes. -exp Calculate c2*exp(c1*x) at each voxel of a volume, where x is the voxel value and c1 and c2 are constants specified by -constant c1 or -const2 c1 c2. The default value for these constants is 1.0. -log Calculate log(x/c2)/c1 for each voxel of a volume, where x is the voxel value and c1 and c2 are constants specified by -constant c1 or -const2 c1 c2. The default value for these constants is 1.0. -scale Scale a volume either by multiplying by a single constant (use -constant) or by multiplying by the first constant and adding the second (use -const2). -clamp Clamp a volume to lie between two values specified with -const2. -segment Segment (binarize) a volume so that values within the range specified by -const2 give value 1 and those outside it give value 0. -nsegment Opposite of -segment: values within the range specified by -const2 give value 0 and those outside it give value 1. -percentdiff Calculate the percent difference between two volumes (normalized to the first volume). If the first volume is less than a threshold (or zero), then the value specified by -nan or -zero is used. The threshold is specified using -constant, with a default of zero. -pd Synonym for -percentdiff. -eq Test for equality of two volumes or a volume and a constant. Values are rounded to the nearest integer before performing the test. Output 1 for true and 0 for false at each voxel. -ne Test for inequality of two volumes or a volume and a constant. Values are rounded to the nearest integer before performing the test. Output 1 for true and 0 for false at each voxel. -gt Test for volume 1 > volume 2 or a volume > a constant. Output 1 for true and 0 for false at each voxel. -ge Test for volume 1 >= volume 2 or a volume >= a constant. Output 1 for true and 0 for false at each voxel. -lt Test for volume 1 < volume 2 or a volume < a constant. Output 1 for true and 0 for false at each voxel. -le Test for volume 1 <= volume 2 or a volume <= a constant. Output 1 for true and 0 for false at each voxel. -and Test for volume 1 && volume 2 or a volume && a constant. Values are rounded to the nearest integer before performing the test. Out- put 1 for true and 0 for false at each voxel. -or Test for volume 1 || volume 2 or a volume || a constant. Values are rounded to the nearest integer before performing the test. Out- put 1 for true and 0 for false at each voxel. -not Perform logical negation on a volume: convert non-zero to zero and zero to one. Values are rounded to the nearest integer before the negation. -isnan Test a volume for invalid values (NaN). Output 1 for invalid values and 0 for valid values. -nisnan Opposite of -isnan. Output 0 for invalid values and 1 for valid values. -count_valid Count the number of valid voxels across a series of volumes. If none of the volumes has valid data, then zero is written out (ie. -zero and -ignore_nan are always assumed, unlike other cumulative operations). Generic options for all commands: -help Print summary of command-line options and exit. -version Print the program's version number and exit. AUTHOR
Peter Neelin COPYRIGHTS
Copyright (C) 1995 by Peter Neelin SEE ALSO
minccalc(1) $Date: 2004-05-20 21:52:08 $ MINCMATH(1)
All times are GMT -4. The time now is 01:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy