DISQUS

DISQUS Hello! Tech-Recipes is using DISQUS, a powerful comment system, to manage its comments. Learn more.

Community Page

Tech-Recipes

Cookbook of Tech Tutorials
Jump to original thread »
Author

Sending multiple lines of input to a program | UNIX shell scripting | Tech-Recipes

Started by qdideas · 9 months ago

No excerpt available. Jump to website »

2 comments

  • It's possible even to create a multi-line file, using this method:

    cat<<EOF > /tmp/MY_NEW_FILE
    line 1
    one more line
    ...
    last line
    EOF
  • I can never remember the term for this technique, but Rex, one of the many who have contributed recipes to Tech-Recipes has a recipe describing this and I look to it to remember that they are called here documents. I think it is one of the more obscure but useful tips in shell scripting.

    Anyone who knows about here docs definitely has a strong background in UNIX. If you are willing to share any more tips, you can add them as an official recipe in the category hierarchy that you feel is appropriate. If they are new recipes, we'll validate them and you'll be compensated... A hint to any recipe authors and future Tech Chefs out there, it's a good idea to do a little search first to see if your idea for a recipe is in our cookbook of over a thousand recipes.

    Quinn

Add New Comment

Returning? Login