The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #3 (permalink)  
Old 09-09-2008
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,945
I also am confused, like Era, about what you are trying to achieve.

For the record, you can nest heredocs in ksh93 as shown by the following trivial example:

Code:
#!/usr/bin/ksh93

TMP=file.$$

cat <<< $(echo "first time") > $TMP

cat <<EOF1 >> $TMP
current date: $(date)
===================
$(cat <<EOF2
second time
current date: $(sleep 1; date)
===================
$(cat <<EOF3
third time
current date: $(sleep 1; date)
EOF3
)
===================
EOF2
)
EOF1

cat $TMP

rm $TMP


Code:
$ ./trivial
first time
current date: Tue Sep  9 21:48:52 EDT 2008
===================
second time
current date: Tue Sep  9 21:48:53 EDT 2008
===================
third time
current date: Tue Sep  9 21:48:54 EDT 2008
===================
$