Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wrap it in $() to execute. And even if you pipe it into a file, no chmod is required. "sh file" works as it should


or use eval

~$ help eval eval: eval [arg ...] Execute arguments as a shell command.

    Combine ARGs into a single string, use the result as input to the shell,
    and execute the resulting commands.
   Exit Status:
    Returns exit status of command or success if command is null.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: