printf in bash

Chris F.A. Johnson cfaj-uVmiyxGBW52XDw4h08c5KA at public.gmane.org
Thu Jun 15 17:32:11 UTC 2006


On Thu, 15 Jun 2006, Neil Watson wrote:

> In Perl I can use print like this:
>
> print <<"*END*";
> This is line one
> This is line two with quotations ""
> *END*
>
> Is there an equivalent in bash?

    See "Here Documents" in the man page:

cat <<EOF
This is line one
This is line two with quotations ""
EOF

-- 
    Chris F.A. Johnson                      <http://cfaj.freeshell.org>
    ===================================================================
    Author:
    Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list