On Sat, Jul 02, 2005 at 05:48:40PM -0600, Bob Proulx wrote: > Chris F.A. Johnson wrote: > > William Park wrote: > > >It would be nice if I can read a file and process it as though it was > > >here-document text in the script. Mainly, I want variable substitution, > > >without calling lots of 'sed'. > > > > > >In Python, you would do > > > print "..." % ... > > > > > >So, perhaps, you can use syntax like > > > cat <<+ file > > > cat <<<< file > > > > Why can't you use: > > > > cat < file > > The original poster said that the behavior wanted was variable > substitution as in a here-document. Using 'cat < file' would not > expand any variables. > > However counter proposals are useful. Will this work for you? > > eval echo $(<file) > > That will expand variables from the file using existing standard syntax.
If the file contains '<' or '>' (like HTML), then it will do redirection. Probably, not good thing. :-) -- William Park <[EMAIL PROTECTED]>, Toronto, Canada ThinFlash: Linux thin-client on USB key (flash) drive http://home.eol.ca/~parkw/thinflash.html BashDiff: Super Bash shell http://freshmeat.net/projects/bashdiff/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash