0

I'm a beginner of the bash scripting. I need to know how I can create a bash script for the output an executable file.
More clearly, I have an executable file that it is ./word. The output of this command is not static. So, my script should read this output and put it into the script but how?

2
  • Probably you are looking for IO redirection Commented Dec 11, 2012 at 10:02
  • Depends what you want to do with that output. Sometimes you'll want backticks, other times not. Tell us what you're trying to do. Commented Dec 15, 2012 at 19:44

1 Answer 1

1

If ./word outputs some shell commands that you wish to run (like ssh-agent does), you can use eval "$(./word)".

If you just want to write the output to a file, use ./word > file.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.