Sponsored Content
Top Forums Shell Programming and Scripting How to write config shell script to pass variables in master shell script? Post 302941326 by clx on Wednesday 15th of April 2015 06:14:32 AM
Old 04-15-2015
Code:
$ cat db.config
input1=someinput
input2=someotherinput


$ cat myscript.sh
. db.config
echo $input1
echo $input2


$./myscript.sh
someinput
someotherinput
$

This User Gave Thanks to clx For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to parse config variables from external file to shell script

How do i use a config.txt to recursively pass a set of variables to a shell script eg my config.txt looks like this : path=c://dataset/set1 v1= a.bin v2= b.bin path=c://dataset/set2 v1= xy.bin v2= abc.bin .................. and so on . and my testscript : (2 Replies)
Discussion started by: pradsh
2 Replies

2. Shell Programming and Scripting

how to access variables in a config file inside a shell script

I'm writing a shell script. I want to put the variables in a separate config files and use those inside my script. e.g. the config file (temp.conf)will have the values like mapping=123 file_name=xyz.txt I want to access these variables in temp.conf(i.e. mapping and file_name) from inside the... (7 Replies)
Discussion started by: badrimohanty
7 Replies

3. Shell Programming and Scripting

pass perl variables to shell script

I have a perl script that opens a text file containing numbers on each line: for example: 755993 755994 755995 755996 755997 755998 The perl script takes these numbers and store them as an array @raw_data, where I can access individual numbers by using $raw_data for the value 755993.... (2 Replies)
Discussion started by: xchen89x
2 Replies

4. Shell Programming and Scripting

call another shell script and pass parameters to that shell script

Hi, I basically have 2 shell scripts. One is a shell script will get the variable value from the user. The variable is nothing but the IP of the remote system. Another shell script is a script that does the job of connecting to the remote system using ssh. This uses a expect utility in turn. ... (2 Replies)
Discussion started by: sunrexstar
2 Replies

5. UNIX for Dummies Questions & Answers

Pass variables from a text file to a shell script

Hi, I have a text file as follows: a.txt ------ STEPS=3 STEP_DURATION=100 INTERVAL=60 I want to use these values in a shell script. How to go about this? (3 Replies)
Discussion started by: akarnya
3 Replies

6. Shell Programming and Scripting

Unable to pass shell script variable to awk command in same shell script

I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist. diff=$1$2.diff id=$2 new=new_$diff echo "My id is $1" echo "I want to sync for user account $id" ##awk command I am using is as below cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies

7. UNIX for Dummies Questions & Answers

How to write Config shell script to pass variables in master shell script?

Dear Unix gurus, We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies

8. Shell Programming and Scripting

Need help to write to log file whether the shell script call pass fail

I have the below script triggered daily at 330am in the morning, since last 7 days job not writing anything to database. below impala shell calling shell file which has sql , it is extracting data and loads to a flat file txt file. which is going wrong for last 1 week. need help, echo... (2 Replies)
Discussion started by: cplusplus1
2 Replies

9. Shell Programming and Scripting

Pass C shell array to another C shell script(csh) and shell(sh)

Dear Friends, Please help me on this my script name is send.csh In this i have written the statement like this set args = ( city state country price ) I want to pass this array to another c shell called receiver.csh. and i want to use it in this c shell or how to pass to... (2 Replies)
Discussion started by: SA_Palani
2 Replies

10. Shell Programming and Scripting

Shell script to pass the config file lines as variable on the respective called function on a script

I want to make a config file which contain all the paths. i want to read the config file line by line and pass as an argument on my below function. Replace all the path with reading config path line by line and pass in respective functions. how can i achieve that? Kindly guide. ... (6 Replies)
Discussion started by: sadique.manzar
6 Replies
MINCCONCAT(1)							 MINC User's Guide						     MINCCONCAT(1)

NAME
mincconcat - concatenate minc files along a specific dimension SYNOPSIS
mincconcat [<options>] <infile1>.mnc [<infile2>.mnc ...] <outfile>.mnc DESCRIPTION
Mincconcat will concatenate a number of minc files together, producing a single output file. The concatenation is done along a specified dimension, with the slices being sorted into ascending order. The concatenation dimension can either be a dimension in the file, in which case coordinates for sorting are taken directly from the input files, or it can be a new dimension and the coordinates are specified with a command-line option. 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). -verbose Print out progress information for each chunk of data copied (default). -quiet Do not print out progress information. -max_chunk_size_in_kb size Specify the maximum size of the copy buffer (in kbytes). Default is 4096 kbytes. -filelist filename Specify a file containing a list of input file names. If "-" is given, then file names are read from stdin. 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. Output type options -filetype Don't do any type conversion (default). -byte Write out 8-bit integer voxels. -short Write out 16-bit integer voxels. -int Write out 32-bit integer voxels. -long Superseded by -int. -float Write out single-precision floating point values. -double Write out double-precision floating point values. -signed Write out values as signed integers (default for short and long). Ignored for floating point types. -unsigned Write out values as unsigned integers (default for byte). Ignored for floating point types. -valid_range min max Specifies the valid range of output voxel values in their integer representation. Default is the full range for the type and sign. This option is ignored for floating point values. Concatenation options -concat_dimension name Specifies the name of concatenation dimension. If the dimension exists in the input files, then coordinates are taken from those files. If not, then a new dimension is created and the coordinate for each input file is taken from command-line options. The default is to use the slowest varying dimension of the first file. -start start Specifies the starting coordinate for the new dimension (default = 0.0). -step step Specifies the separation between voxels for the new dimension (default = 1.0). -width width Specifies the (constant) width of each sample along the new dimension (default = none). -coordlist c1,c2,... Specifies a comma-separated list of coordinates along the new dimension. -widthlist w1,w2,... Specifies a comma-separated list of widths along the new dimension. -filestarts s1,s2,... Specifies a comma-separated list of offsets to the coordinate origins for each of the files listed on the command line. This option is useful for concatenating files along an existing dimension, for example for concatenating multiple functional runs along a time dimension. -check_dimensions Check that all input files have matching sampling in world dimensions (default). -nocheck_dimensions Ignore any differences between input files in world dimensions sampling. -ascending Sort coordinates in ascending order (default). -descending Sort coordinates in descending order. -interleaved Sort slabs by their dimension coordinate, interleaving if necessary (default). -sequential Don't sort slabs, just concatenate them together. WARNING - this will destroy the dimension information along the concatenating dimension, replacing the start and step with zero and one. Generic options for all commands: -help Print summary of command-line options and exit. -version Print the program's version number and exit. EXAMPLES
To concatenate two volumes with dimensions zspace, yspace, xspace, having interleaved slices along zspace, we can simply use mincconcat input1.mnc input2.mnc output.mnc If we have a bunch of compressed (yspace, xspace) images that we wish to concatenate into an evenly spaced volume, then we can type mincconcat input1.mnc.gz input2.mnc.gz input3.mnc.gz input4.mnc.gz output.mnc -concat_dimension zspace -start -23 -step 2 AUTHOR
Peter Neelin COPYRIGHTS
Copyright (C) 1995 by Peter Neelin $Date: 2005-07-15 17:38:08 $ MINCCONCAT(1)
All times are GMT -4. The time now is 11:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy