Sponsored Content
Full Discussion: $i
Top Forums Shell Programming and Scripting $i Post 302157600 by DNAx86 on Friday 11th of January 2008 11:59:40 AM
Old 01-11-2008
Question $i

Hi,

I tryed to do this part of script:

while (( i <= $# ))
do
echo $i
echo '$'$i

case $i in #or $$i
"-p")
echo -p
((i += 1))
if test $i == "-d"
then
echo Error
exit 1
fi
((i -= 1));;

"-d")
;;

"-min")
;;

"-max")
;;
esac


((i += 1)) #C style
done

I write this script thinking that $i or $$i will be interpreted like a $1, $2,.. the parameters

But this isn't what the script do.

How can I edit it to make what I want?
 
build-lives-rfx-plugin(1)				      General Commands Manual					 build-lives-rfx-plugin(1)

NAME
build-lives-rfx-plugin - builds rendered effects for LiVES SYNOPSIS
build-lives-rfx-plugin script_name [plugin_dir] -get section file DESCRIPTION
This perl script is used by LiVES to compile an RFX (rendered effect) plugin for LiVES. It is generally called from build-lives-rfx-plugin- multi for a script which has a language code representing LiVES-perl. The script_name must be the full (absolute) path to the plugin script, and plugin_dir can be used to specify the output directory where the compiled plugin should be generated. If plugin_dir is not defined then /tmp is assumed. The second variant with -get is used to print out a script section from a plugin script to stdout. It is generally only used internally by LiVES. Return values The script returns the following values 0 - success 1 - the value of a trigger was greater than the number of parameters 2 - a value could not be read from the script file 3 - the language code of the plugin script was not equivalent to LiVES-perl 4 - the API version level of the plugin script was invalid 5 - the <define> section was missing from the plugin script SEE ALSO
build-lives-rfx-plugin-multi(1), lives(1) AUTHOR
Gabriel Finch a.k.a Salsaman (salsaman@xs4all.nl) May 9 2010 build-lives-rfx-plugin(1)
All times are GMT -4. The time now is 10:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy