| | |
Hey
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Feb 2008
Posts: 10
Reputation:
Solved Threads: 0
Shell Scripting Syntax (Toggle Plain Text)
for (( i = 1 ; i <= 10; i++ )) do #J = 100 echo `expr 1000 * $i` #java SortTester $num >> data.txt done
This is not working why?
•
•
Join Date: Oct 2007
Posts: 399
Reputation:
Solved Threads: 47
Hey There,
You pretty much had it. You just need to backslash the * (multiplication operator) and your script works perfectly
Nice work 
, Mike
You pretty much had it. You just need to backslash the * (multiplication operator) and your script works perfectly

Shell Scripting Syntax (Toggle Plain Text)
#!/bin/bash for (( i = 1 ; i <= 10; i++ )) do #J = 100 echo `expr 1000 \* $i` #java SortTester $num >> data.txt done
•
•
•
•
$ ./script
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000

, Mike
Linux and Unix Tips, Tricks and Individual Advice - The Linux and Unix Menagerie!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
------------------------------------------------------------------------
The greatest viral marketing idea of all time, get your copy of this Free Report now!
![]() |
Similar Threads
- "hey STUPID finish the form" function? (PHP)
- hey guys; having some trouble with this program i'm writing (Java)
- Hey Dani (Geeks' Lounge)
- hey im new here (Geeks' Lounge)
- Hey, new here and I need some PHP help. (PHP)
- hey whats goin on (Geeks' Lounge)
Other Threads in the Shell Scripting Forum
- Previous Thread: Please i need help in UNIX Shell Scripting..
- Next Thread: newbie question - sorting a vertical list into a csv format
| Thread Tools | Search this Thread |
Tag cloud for Shell Scripting





