Redirect ruby exec output -


i executing svn command using ruby's exec. don't want output appear on console. want go ruby string variable on processing.

ruby code - exec "svn log repo"

this code shows me result of execution of svn command. don't want in console.

please me.

exec not work since new process replace current 1 (your script end @ exec; following statements never executed).

use backticks:

string_variable = `svn log repo` 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -