Sponsored Content
Top Forums Shell Programming and Scripting Using the counter of a for loop in command line parameter Post 302204340 by jeriryan87 on Wednesday 11th of June 2008 10:40:08 AM
Old 06-11-2008
Using the counter of a for loop in command line parameter

Say I have (in psuedocode)
For i=1 to 10
tar cvfb /... 5*i /junk(i)
end

What I mean is that I want each successive for loop to have the block size parameter be 5 times the current counter. This isn't my actual code, just a stupid example...So the question is how do I descrive that parameter so that it uses the counter times five and have the /junk(i) be run as /junk1, /junk2, etc...?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Command Line width parameter

can someone please tell me how i can increase the number of characters that can be input on the command line? (2 Replies)
Discussion started by: Scoogie
2 Replies

2. Programming

Command line parameter for C program

I am writing a C program that part of the idea is to using a command line parameter to control not to run certain part of the sub program. I am totally new to C, I do not have any idea how to pass a command line arguments from a C program. Can anyone help ?! Thanks (3 Replies)
Discussion started by: Wing m. Cheng
3 Replies

3. Shell Programming and Scripting

using tab to finish command line parameter

Anyone know how to set it up so that when at command line in unix (specifically solaris 2.5.1), and you hit the tab it will finish the command with the nearest file that matches? AND how to set it up so using up and down arrows access your previous commands? Thanks for all the help here, i've had... (3 Replies)
Discussion started by: kymberm
3 Replies

4. Shell Programming and Scripting

replacing a string in a file with command line parameter

Hello, I am trying to replace a string with a paramter given along with the script. I am replacing application1 to application2 with the script: ./change_app.sh application2 change_app.sh: #!/bin/ksh grep $1 applications.dat 2>&1 >/dev/null echo $1 file=pckage.new sed 's/Name:... (5 Replies)
Discussion started by: chiru_h
5 Replies

5. Shell Programming and Scripting

How to compare a command line parameter with -- in shell scripting

Hi, I need to check if a parameter provided at the command line is equal to --.How can i do that ? Please help me. Thanks and Regards, Padmini (4 Replies)
Discussion started by: padmisri
4 Replies

6. Shell Programming and Scripting

How to get the last command line parameter?

"$#" gives the number of command-line arguments. How do you get the last command-line parameter (or any particular one determined by a variable)? I thought it would be "${$#}", but that produces something completely unexpected. (4 Replies)
Discussion started by: dkarr
4 Replies

7. Shell Programming and Scripting

Parsing a command line parameter in script

I have a simple script that builds a complex program call which passes a number of parameters to the program. I'm trying to enhance the script to include the value of the command line parameter in the name of a file being created. The problem I'm having is that the parameter may include a forward... (11 Replies)
Discussion started by: pbmax626
11 Replies

8. Shell Programming and Scripting

perl script - command line parameter

i am a beginner, i want to make a program that takes any command line arguments... and print it out in reverse. ie. if the command line argument is "thanks for helping me" i want it to output "me helping for thanks" :D i have tried using the reverse command, but i cant get it working!! ... (3 Replies)
Discussion started by: bshell_1214
3 Replies

9. Shell Programming and Scripting

Incrementing the date depending on the Counter (parameter) passed to the script

Hello Everyone, I have been trying to complete a shell script where, I need to increment the date depending on the file (depending on the date) availability on the remote server. i.e. Basically, I will be passing a counter (like parameter 1 or 2 or 3 or 4). First I will check for the... (1 Reply)
Discussion started by: filter
1 Replies

10. Shell Programming and Scripting

Help on Adding one counter loop at the end of each line in a file

Hello All, I have file a.txt I want to add a counter loop at the end of each line in a file ill explain: i have a site h**p://test.test=Elite#1 i want to add a a counter to the number at the end of the file, that it will be like this urlLink//test.test=Elite#1 urlLink//test.test=Elite#2... (3 Replies)
Discussion started by: nexsus
3 Replies
GLGETHISTOGRAMPARAMETER(3G)											       GLGETHISTOGRAMPARAMETER(3G)

NAME
glGetHistogramParameterfv, glGetHistogramParameteriv - get histogram parameters C SPECIFICATION
void glGetHistogramParameterfv( GLenum target, GLenum pname, GLfloat *params ) void glGetHistogramParameteriv( GLenum target, GLenum pname, GLint *params ) PARAMETERS
target Must be one of GL_HISTOGRAM or GL_PROXY_HISTOGRAM. pname The name of the parameter to be retrieved. Must be one of GL_HISTOGRAM_WIDTH, GL_HISTOGRAM_FORMAT, GL_HISTOGRAM_RED_SIZE, GL_HISTOGRAM_GREEN_SIZE, GL_HISTOGRAM_BLUE_SIZE, GL_HISTOGRAM_ALPHA_SIZE, GL_HISTOGRAM_LUMINANCE_SIZE, or GL_HISTOGRAM_SINK. params Pointer to storage for the returned values. DESCRIPTION
glGetHistogramParameter is used to query parameter values for the current histogram or for a proxy. The histogram state information may be queried by calling glGetHistogramParameter with a target of GL_HISTOGRAM (to obtain information for the current histogram table) or GL_PROXY_HISTOGRAM (to obtain information from the most recent proxy request) and one of the following values for the pname argument: ---------------------------------------------------------------- Parameter Description ---------------------------------------------------------------- GL_HISTOGRAM_WIDTH Histogram table width GL_HISTOGRAM_FORMAT Internal GL_HISTOGRAM_RED_SIZE Red component counter size, in bits GL_HISTOGRAM_GREEN_SIZE Green component counter size, in bits ------------------------------------------------------------------------ Parameter Description ------------------------------------------------------------------------ GL_HISTOGRAM_BLUE_SIZE Blue component counter size, in bits GL_HISTOGRAM_ALPHA_SIZE Alpha component counter size, in bits GL_HISTOGRAM_LUMINANCE_SIZE Luminance component counter size, in bits GL_HISTOGRAM_SINK Value of the sink parameter ------------------------------------------------------------------------ NOTES
glGetHistogramParameter is present only if GL_ARB_imaging is returned when glGetString is called with an argument of GL_EXTENSIONS. ERRORS
GL_INVALID_ENUM is generated if target is not one of the allowable values. GL_INVALID_ENUM is generated if pname is not one of the allowable values. GL_INVALID_OPERATION is generated if glGetHistogramParameter is executed between the execution of glBegin and the corresponding execution of glEnd. SEE ALSO
glGetHistogram(3G), glHistogram(3G) GLGETHISTOGRAMPARAMETER(3G)
All times are GMT -4. The time now is 12:40 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy