10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have a date variable like 2012-12-31 ( YYYY -MM -DD ) in flat file and it has to be incremtented by 1 every time i run the script
Example : i tried the below script after data modifcation but this does not seem to work
expr `20121231 +%Y%m%d` + 1
Note : Mine is not a GNU... (4 Replies)
Discussion started by: akshay01987
2. Shell Programming and Scripting
I am trying to increment my variable names to match a counter that is to be used later on...
Basically, i have a for loop that lists directories (for example TEST_OS DVP_OS PROD_OS ) but this loop is not static, it may contain 3 directory once and the next run 5 directories.
I... (6 Replies)
Discussion started by: Stephan
3. UNIX for Dummies Questions & Answers
want to increment a variable in a for loop like this:
for (( c=$total-1; c>=0; c-- ))
But it gives the error:
No such file or directory
How can i do this only incrementing the c variable?
Thanks (8 Replies)
Discussion started by: limadario
4. Shell Programming and Scripting
I'm currently trying to write a ksh or csh script that would change the name of a file found in directories and attach to the name an incrementing three digit number.
I know how to write a script that will go:
000, 001, 002, 003, etc
The twist is I need more increments then allowed by a 3... (11 Replies)
Discussion started by: Rust
what is the result of the below, and how does it work?
int i = 5;
cout << i++ * ++i << endl;
cout << i << endl; (12 Replies)
Discussion started by: milhan
6. Shell Programming and Scripting
echo "Enter Starting id:"
echo "Enter Closing id:"
echo "INSERT INTO TABLE( FIELD1, FIELD2, FIELD3, FIELD4,
... (7 Replies)
Discussion started by: ultimatix
7. Shell Programming and Scripting
I wrote this script with the help of you guyz.My next challenge is to increment the port using single file.So far iam using this code to increment hp1 and hp2 .To increment port numbers, iam using two different files (.default_port_hp1 and .default_port_hp2).The challenge for me is to use... (0 Replies)
Discussion started by: coolkid
8. Shell Programming and Scripting
These days Iam doing pretty good scripting work that is all because of you fellas.Thank you so much.
As it goes ,here comes my next problem.Iam trying to implement automatic port number incrementing.
echo "Enter for default port:
... (5 Replies)
Discussion started by: coolkid
9. Shell Programming and Scripting
Another question, is it possible to, in a for-loop incrementing until it reaches a certain number, to have it loop again without incrementing? Just have it drop what it is doing when it reaches this command and start again at the same number it was at? I know I could make a while loop and just... (0 Replies)
Discussion started by: jeriryan87
10. Shell Programming and Scripting
LIST="a b c d e"
for word in $LIST
would give me
With the first iteration of the for loop, I get "a" as the result.
Is it possible that I get both "a" and "b" in only the first iteration.
In the next iteration I get "c" and "d" and so on.... (2 Replies)
Discussion started by: run_time_error