Sponsored Content
Top Forums Shell Programming and Scripting Use while loop - output variable Post 302884743 by djzah on Tuesday 21st of January 2014 02:28:37 PM
Old 01-21-2014
Thanks for the feedback...

I use ls */*$domain <--which is fed from the .txt file for the domains I'm interested in and it works great so far but I want to output the results (which would be the full path and zone file name) into a variable. I thought you could output the results using a > to variable name but that doesn't seem to work. If I could get the entire path and file name into a variable then I could either print the variable with the commands I want like
Code:
print "cp $fullpathandfilenamevar $fullpathandfilenamevar-bak"

or something like that.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to give a variable output name in a shell script inside a for loop

Hi all I run my program prog.c in the following way : $ ./prog 1 > output.txt where 1 is a user defined initial value used by the program. But now I want to run it for many a thousand initial values, 1-1000, and store all the outputs in different files. Like $ ./prog 1... (1 Reply)
Discussion started by: alice06
1 Replies

2. Shell Programming and Scripting

[SHELL: /bin/sh] For loop using variable variable names

Simple enough problem I think, I just can't seem to get it right. The below doesn't work as intended, it's just a function defined in a much larger script: CheckValues() { for field in \ Group_ID \ Group_Title \ Rule_ID \ Rule_Severity \ ... (2 Replies)
Discussion started by: Vryali
2 Replies

3. Shell Programming and Scripting

printing variable with variable suffix through loop

I have a group of variables myLINEcnt1 - myLINEcnt10. I'm trying to printout the values using a for loop. I am at the head banging stage since i'm sure it has to be a basic syntax issue that i can't figure out. For myIPgrp in 1 2 3 4 5 6 7 8 9 10; do here i want to output the value of... (4 Replies)
Discussion started by: oly_r
4 Replies

4. UNIX for Dummies Questions & Answers

Loop and variable not exactly variable: what's wrong

Hello guys, This truly is a newbie question. I'm trying to make a loop to execute simultaneous commands indefinitely while using variable. Here is how my mess looks like (this is just an example): #!/bin/bash IP=`shuf -n 1 IP.txt` # I figured this would be easier to select random lines... (4 Replies)
Discussion started by: bobylapointe
4 Replies

5. Shell Programming and Scripting

Array Variable being Assigned Values in Loop, But Gone when Loop Completes???

Hello All, Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....? I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping through a string containing some of these "Illegal Characters". Now... (5 Replies)
Discussion started by: mrm5102
5 Replies

6. UNIX for Dummies Questions & Answers

Need to get a loop variable from output of a command

Hi, I am trying to get a loop counter i and set its value as the ouput of a command: i=`printmo TEST1 | grep -i TEST2 | wc -l` Then I want to use i as counter to run a loop i number of times. Like if i gets a value of 5 I'll have to run loop 5 times. But will i here be a numeric... (3 Replies)
Discussion started by: pat_pramod
3 Replies

7. Shell Programming and Scripting

[Solved] How to increment and add variable length numbers to a variable in a loop?

Hi All, I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies

8. Shell Programming and Scripting

Print for loop variable in output too

Hi, This is my input file cat input chr1:100-200 chr1:220-300 chr1:300-400 Now, I would like to run a program that will take each of the input record for i in `cat input`; do program $i | wc -l;done the output will be something like 10 20 30 But, I would like to print the... (4 Replies)
Discussion started by: jacobs.smith
4 Replies

9. UNIX for Advanced & Expert Users

Passing variable as input & storing output in other variable

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

10. UNIX for Beginners Questions & Answers

How do I assign the output of a command to a variable within a loop in bash?

In the else of the main if condition . else set lnk = $(readlink -f <path> | cut -d '/' -f7) echo "$lnk" if ] When I run the above on command line , the execution seems to be fine and I get the desired output. But when I try to assign it to a variable within a loop... (12 Replies)
Discussion started by: sankasu
12 Replies
GLPASSTHROUGH(3G)						   OpenGL Manual						 GLPASSTHROUGH(3G)

NAME
glPassThrough - place a marker in the feedback buffer C SPECIFICATION
void glPassThrough(GLfloat token); PARAMETERS
token Specifies a marker value to be placed in the feedback buffer following a GL_PASS_THROUGH_TOKEN. DESCRIPTION
Feedback is a GL render mode. The mode is selected by calling glRenderMode() with GL_FEEDBACK. When the GL is in feedback mode, no pixels are produced by rasterization. Instead, information about primitives that would have been rasterized is fed back to the application using the GL. See the glFeedbackBuffer() reference page for a description of the feedback buffer and the values in it. glPassThrough inserts a user-defined marker in the feedback buffer when it is executed in feedback mode. token is returned as if it were a primitive; it is indicated with its own unique identifying value: GL_PASS_THROUGH_TOKEN. The order of glPassThrough commands with respect to the specification of graphics primitives is maintained. NOTES
glPassThrough is ignored if the GL is not in feedback mode. ERRORS
GL_INVALID_OPERATION is generated if glPassThrough is executed between the execution of glBegin() and the corresponding execution of glEnd(). ASSOCIATED GETS
glGet() with argument GL_RENDER_MODE SEE ALSO
glFeedbackBuffer(), glRenderMode() COPYRIGHT
Copyright (C) 1991-2006 Silicon Graphics, Inc. This document is licensed under the SGI Free Software B License. For details, see http://oss.sgi.com/projects/FreeB/. AUTHORS
opengl.org opengl.org 06/10/2014 GLPASSTHROUGH(3G)
All times are GMT -4. The time now is 03:25 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy