for ((  i = 1 ;  i <= 10;  i++  ))
do
  #J = 100
  echo `expr 1000 * $i`
  #java SortTester $num >> data.txt
done

This is not working why?

Hey There,

You pretty much had it. You just need to backslash the * (multiplication operator) and your script works perfectly :)

#!/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

Nice work :)

, Mike

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.