Jump to content

Use of the echo command in shell scripting

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
2 replies to this topic

#1
DarkLordoftheMonkeys

DarkLordoftheMonkeys

    Programming Professional

  • Members
  • PipPipPipPipPip
  • 255 posts
Does the echo command send its input to the standard output of the script it's used in?

#2
ZekeDragon

ZekeDragon

    Writes binary right handed and hex left handed

  • Moderators
  • 2,103 posts
Echo sends its input to standard output, wherever that happens to point. If you don't direct it anywhere, it'll appear on the terminal screen that runs the script. If you direct it using a redirect it'll be used as standard input for whatever program it's redirected into.
Wow I changed my sig!

#3
marwex89

marwex89

    Writes binary right handed and hex left handed

  • Members
  • PipPipPipPipPipPipPipPipPip
  • 10,720 posts
Yes, if you're using bash:

echo MAN Page

EDIT: You beat me zeke
Hey! Check out my new Toyota keyboaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa