The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 06-20-2005
yongho yongho is offline
Registered User
  
 

Join Date: Jun 2005
Location: New York City
Posts: 95
[non-important] Indent here-docs?

I recently coded a typical ftp script looking like


Code:
ftp -n $hostname <<
user $user $pass
<commands..>
quit
!

I know the code fails when you try to indent it like:


Code:
    ftp $hostname <<
    user $user $pass
    <commands..>
    quit
    !

Just for the sake of neat code, is there a way to indent it at all (because I have that in an IF statement)?