Adding same value to variables in does each repetition of command

 
Thread Tools Search this Thread
Special Forums Windows & DOS: Issues & Discussions Adding same value to variables in does each repetition of command
# 1  
Old 06-13-2017
Adding same value to variables in does each repetition of command

So, I have this command:
Code:
mkdir rolled

for %%x in (*gif) do convert %%x -roll +2+6 %%x|move %%x rolled

I'd like to have the +2 and +6 accumulate here.
In each new gif tackled, it should increase by the amount: +2 (for x) and +6 (for y)

Is this possible?

I'm on Windows, DOS.

Last edited by pasc; 06-14-2017 at 07:53 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Repetition in a particular interval

Suppose I have a word which is repeating in a string continuously. I have a set of intervals. Then how do I find the number occurrences of that word in those intervals and their location of occurrences. For example - Suppose there is a huge string anfie.......sirn of 10000 letters. Now the word... (2 Replies)
Discussion started by: ANKIT ROY
2 Replies

2. UNIX for Dummies Questions & Answers

Adding variables to repeating strings

Hello, I want to add a letter to the end of a string if it repeats in a column. so if I have a file like this: DOG001 DOG0023 DOG004 DOG001 DOG0023 DOG001 the output should look like this: DOG001-a DOG0023-a DOG004 DOG001-b (15 Replies)
Discussion started by: verse123
15 Replies

3. Shell Programming and Scripting

repetition calculation

cat mylist First_NAME Gender Mike M Sara F Raya M Sara F Fibi F Mike M Mike M Micheal M can someone please help me to get a script to cacluate the number of repetions for each (First name... (3 Replies)
Discussion started by: Sara_84
3 Replies

4. Programming

Words combinations without repetition

How can I get all combinations of 5 words from 10 words. For example I have 3 words and I want to get all combinations of 2 words. "A", "B", "C" it would like AB, BC, AC. Maybe you know some usefull code or example. Thanx a lot. P.S. Sorry if I'm not right enough cause I don't know English... (2 Replies)
Discussion started by: romeo5577
2 Replies

5. Shell Programming and Scripting

Adding Variables

Hi. I have a for loop that I use to extract integer values in a shell script (ksh). Now, I would like to add the values. My preference, from my c programming days, would be to do something like the commented out line below in the for loop. However, this is not recognised. So I use the line... (2 Replies)
Discussion started by: mikem22
2 Replies

6. Solaris

Creating script adding 3 different variables in 3 columns

I have 3 variables with different information.. they look like this (row-wise aswell): Variable1 = Roland Kalle Dalius Variable2 = ake123 ler321 kaf434 Variable3 = Richardsen Sworden Lokthar How can I sort them by variable3 alphabetical and add them into the same output so... (0 Replies)
Discussion started by: Prantare
0 Replies

7. Shell Programming and Scripting

Adding variables in a unix script

Hi I am trying to add variables(float values) in a unix script but am getting an error value=`expr $a + $b + $c` The error I am getting is "expr: non-numeric argument" I guess it has got to something with the decimal points. Plz help (13 Replies)
Discussion started by: akashtcs
13 Replies

8. Programming

adding variables for, for loop

I have a structure which contains n number of elements. For example: stFruits : apple, grapes, strawberry, pear, kiwi, melon, papaya, mango, orange, sweetlime ..... etc Now i have to write a for loop as follows: int i; int j; j=stFruits.apple+stFruits.grapes+stFruits.pear+.... and so... (3 Replies)
Discussion started by: jazz
3 Replies

9. UNIX for Advanced & Expert Users

Looping/Repetition in Batch files

Hi All, I'm just new to UNIX, does anyone know how to create a batch file in UNIX that does the following routines: 1.) process multiple files in a directory in DOS, I set my sample input file as: set INPUTFILE=%1 in UNIX>> ???? 2.) every file to be processed by executing a program... (1 Reply)
Discussion started by: kimpot7268
1 Replies

10. UNIX for Dummies Questions & Answers

Random numbers without repetition

Is anyone know some scripts to generate random number without repetition using bash; for example generate 10 different random numbers. Thanks (8 Replies)
Discussion started by: asal_email
8 Replies
Login or Register to Ask a Question
PREPARE 
TRANSACTION(7) SQL Commands PREPARE TRANSACTION(7) NAME
PREPARE TRANSACTION - prepare the current transaction for two-phase commit SYNOPSIS
PREPARE TRANSACTION transaction_id DESCRIPTION
PREPARE TRANSACTION prepares the current transaction for two-phase commit. After this command, the transaction is no longer associated with the current session; instead, its state is fully stored on disk, and there is a very high probability that it can be committed success- fully, even if a database crash occurs before the commit is requested. Once prepared, a transaction can later be committed or rolled back with COMMIT PREPARED [commit_prepared(7)] or ROLLBACK PREPARED [roll- back_prepared(7)], respectively. Those commands can be issued from any session, not only the one that executed the original transaction. From the point of view of the issuing session, PREPARE TRANSACTION is not unlike a ROLLBACK command: after executing it, there is no active current transaction, and the effects of the prepared transaction are no longer visible. (The effects will become visible again if the transaction is committed.) If the PREPARE TRANSACTION command fails for any reason, it becomes a ROLLBACK: the current transaction is canceled. PARAMETERS
transaction_id An arbitrary identifier that later identifies this transaction for COMMIT PREPARED or ROLLBACK PREPARED. The identifier must be written as a string literal, and must be less than 200 bytes long. It must not be the same as the identifier used for any currently prepared transaction. NOTES
This command must be used inside a transaction block. Use BEGIN [begin(7)] to start one. It is not currently allowed to PREPARE a transaction that has executed any operations involving temporary tables, created any cursors WITH HOLD, or executed LISTEN or UNLISTEN. Those features are too tightly tied to the current session to be useful in a transaction to be pre- pared. If the transaction modified any run-time parameters with SET (without the LOCAL option), those effects persist after PREPARE TRANSACTION, and will not be affected by any later COMMIT PREPARED or ROLLBACK PREPARED. Thus, in this one respect PREPARE TRANSACTION acts more like COMMIT than ROLLBACK. All currently available prepared transactions are listed in the pg_prepared_xacts system view. Caution: It is unwise to leave transactions in the prepared state for a long time. This will interfere with the ability of VACUUM to reclaim storage, and in extreme cases could cause the database to shut down to prevent transaction ID wraparound (see in the documentation). Keep in mind also that the transaction continues to hold whatever locks it held. The intended usage of the feature is that a pre- pared transaction will normally be committed or rolled back as soon as an external transaction manager has verified that other data- bases are also prepared to commit. If you have not set up an external transaction manager to track prepared transactions and ensure they get closed out promptly, it is best to keep the prepared-transaction feature disabled by setting max_prepared_transactions to zero. This will prevent accidental creation of prepared transactions that might then be forgotten and eventually cause problems. EXAMPLES
Prepare the current transaction for two-phase commit, using foobar as the transaction identifier: PREPARE TRANSACTION 'foobar'; SEE ALSO
COMMIT PREPARED [commit_prepared(7)], ROLLBACK PREPARED [rollback_prepared(7)] SQL - Language Statements 2010-05-14 PREPARE TRANSACTION(7)