Skip to content

Instantly share code, notes, and snippets.

@nuke99
Created May 5, 2012 18:03
Show Gist options
  • Save nuke99/2604407 to your computer and use it in GitHub Desktop.
Save nuke99/2604407 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
selected = 2 # this can be changed anytime . the second of null changed to 2nd beause of this variable
total = 10 #total nulls
word = ",null"
count= word * (total-1)
puts "somesite.com/?id=1 null#{count}--"
#I want the output as
# somesite.com/?id=1 null,2nd,null,null,null,null,null,null,null,null--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment