converted all bash commands into ruby.