Sponsored Content
Top Forums Shell Programming and Scripting Store the output values in array Post 302666199 by KarthikPS on Wednesday 4th of July 2012 01:46:09 AM
Old 07-04-2012
Bug Store the output values in array

Hi,

How to store the values in array from output result,

EG:

I have the result like this,

ps, google, 1.txt, 1
sam, google, 2.txt, 2

These are the four values followed by comma in two sets. I need to store these values set by set. One set contains four values followed by comma.

Script should run one set by set. Once complete the first set, it should take second.

for i in ${name[@]}
do
echo $i
done

USAGE="$0 [initial] [name] [txt file] [value:0|1]

Those values should store in these variable, once its get first set, script should run follows, this should be in loop

Please give some idea
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how do I store the values in array using shell

Hi, Is is possible to get the value using shell script? x=1 y1 = 10 y2 = 15 y3 = 7 echo $y$x is giving y1 (variable name) but I need the value of y1 (i.e. 10 dynamically) Is there any solution? if so, please mail me at kkodava@maxis.com.my ... (2 Replies)
Discussion started by: krishna
2 Replies

2. UNIX for Dummies Questions & Answers

How to store the values in a file into an array

Hi, I do have a file and the contents are as follws: 10 20 30 40 50 Now I want to store those values into an array. How can be done this ?? (3 Replies)
Discussion started by: risshanth
3 Replies

3. UNIX for Dummies Questions & Answers

trouble using read to store values in variables from command output

I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie. I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me. ... (2 Replies)
Discussion started by: ProGrammar
2 Replies

4. Shell Programming and Scripting

Store values in an Array

Hi all. Well, I have the next code: I need to make an array with the values I have in the bucle, but just don't get it... Question is, how can I store in an array that values, and how can I display them with echo? (8 Replies)
Discussion started by: crcbad
8 Replies

5. Shell Programming and Scripting

Store all the passed arguments in an array and display the array

Hi I want to write a script which store all the parameters passed to the script into an array. Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD. I want to know how can I... (3 Replies)
Discussion started by: dgmm
3 Replies

6. Shell Programming and Scripting

How to store output of command to an array

Hello Guys, I am trying to store output of command to an array and then want to print, but it showing an error that "bad substitution". I am not getting why it's happening. Can anyone help me? #!/usr/bin/sh hr=0 min=0 i=1 last $1 | grep -w `date "+%b"` | grep -v '\(0:.*\)' | grep -vw sshd... (8 Replies)
Discussion started by: kasparov
8 Replies

7. Shell Programming and Scripting

Store values from a file into an array variable in Shell

Dear All, I have been trying to do a simple task of extracting 2 fields from the file (3 rows) and store it in an array variable. I tried with: #! /bin/bash ch=`cut -f10 tmp.txt` counter=0 for p in $pid do c=${ch} echo "$c ..$counter" counter=$((counter+1))... (2 Replies)
Discussion started by: ezhil01
2 Replies

8. Shell Programming and Scripting

How to read values and store in array?

I am reading a value from a file and want to store the value in a dynamic array as i don't know the number of occurrences of the value in that file. How can i do that and then later fetch that value from array (25 Replies)
Discussion started by: Prachi Gupta
25 Replies

9. Shell Programming and Scripting

ksh : need to store the output of a awk command to a array

I have awk command : awk -F ' ' '{ print $NF }' log filename And it gives the output as below: 06:00:00 parameters: SDS (2) no no no no doc=4000000000). information: (6 Replies)
Discussion started by: ramprabhum
6 Replies

10. Shell Programming and Scripting

awk loop using array:wish to store array values from loop for use outside loop

Here's my code: awk -F '' 'NR==FNR { if (/time/ && $5>10) A=$2" "$3":"$4":"($5-01) else if (/time/ && $5<01) A=$2" "$3":"$4-01":"(59-$5) else if (/time/ && $5<=10) A=$2" "$3":"$4":0"($5-01) else if (/close/) { B=0 n1=n2; ... (2 Replies)
Discussion started by: klane
2 Replies
FDK(1)								    Plastimatch 							    FDK(1)

NAME
fdk - cone-beam reconstruction from projections using the FDK algorithm The term FDK refers to the authors Feldkamp, Davis, and Kress who wrote the seminal paper "Practical cone-beam algorithm" in 1984. Their paper describes a filtered back-projection reconstruction algorithm for cone-beam geometries. The fdk program in plastimatch is an implmenetation of the FDK algorithm. FDK USAGE
The fdk program takes a directory of 2D projection images as input, and generates a single 3D volume as output. The command line usage is: Usage: fdk [options] Options: -A hardware Either "cpu" or "brook" or "cuda" (default=cpu) -a "num ((num) num)" Use this range of images -r "r1 r2 r3" Set output resolution (in voxels) -f filter Either "none" or "ramp" (default=ramp) -s scale Scale the intensity of the output file -z "s1 s2 s3" Physical size of the reconstruction (in mm) -I indir The input directory -O outfile The output file -F {F,H} Full or half fan bow-tie filter correction The usage of the fdk program is best understood by following along with the tutorials: fdk_tutorial_i and fdk_tutorial_ii. INPUT FILES
Three different formats of input files are supported. These are: o Pfm format image files with geomtry txt files o Raw format image files with geomtry txt files o Varian hnd files The pfm and raw files are similar, in that they store the image as an array of 4-byte little-endian floats. The only difference is that the pfm file has a header which stores the image size, and the raw file does not. Each pfm or raw image file must have a geometry file in the same directory with the .txt extension. For example, if you want to use image_0000.pfm in a reconstruction, you should supply another file image_0000.txt which contains the geometry. A brief description of the geometry file format is given in proj_mat_file_format. The sequence of files should be stored with the pattern: XXXXYYYY.ZZZ where XXXX is a prefix, YYYY is a number, and .ZZZ is the extension of a known type (either .hnd, .pfm, or .raw). For example the following would be a good directory layout for pfm files: Files/image_00.pfm Files/image_00.txt Files/image_01.pfm Files/image_01.txt etc... The Varian hnd files should be stored in the original layout. For example: Files/ProjectionInfo.xml Files/Scan0/Proj_0000.hnd Files/Scan0/Proj_0001.hnd etc... No geometry txt files are needed to reconstruct from Varian hnd format. IMAGE GEOMETRY
By default, when you generate a DRR, the image is oriented as if the virtual x-ray source were a camera. That means that for a right lat- eral film, the columns of the image go from inf to sup, and the rows go from ant to post. The Varian OBI system produces HND files, which are oriented differently. For a right lateral film, the columns of the HND images go from ant to post, and the rows go from sup to inf. An illustration of this idea is shown in the figure below. [image] Geometry of Varian HND files.UNINDENT AUTHOR
Plastimatch is a collaborative project. For more documentation, please visit http://plastimatch.org. For questions, comments, and bug reports, please visit http://groups.google.com/group/plastimatch. COPYRIGHT
Plastimatch development team (C) 2010-2011. You are free to use, modify, and distribute plastimatch according to a BSD-style license. Please see LICENSE.TXT for details. Plastimatch 1.5 June 11, 2011 FDK(1)
All times are GMT -4. The time now is 03:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy