0

I have a file of 500MB and it has strings :

  string_1 ..... string_500,

I need generate the copy of this file which has :

  string_501.......string_1000

I need to do this up to string_500000, what's the best way to solve this?

Ramadheer Singh
  • 4,124
  • 4
  • 32
  • 44

2 Answers2

0

If it is literally as you describe, a constant string with variable suffixes then just generate the new file forgetting the old one.

If it's actually

wibble_1 something_2 that_3 changes_4 randomly_5

the I'd read and parse the thing in perl

djna
  • 54,992
  • 14
  • 74
  • 117
0

If you just want to generate a sequence of strings (string_501 to string_500000), you can do this:

for i in `seq 501 500000`
do
    echo string_${i}
done
dogbane
  • 266,786
  • 75
  • 396
  • 414