The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 09-02-2008
cfajohnson's Avatar
cfajohnson cfajohnson is offline Forum Advisor  
Shell programmer, author
  
 

Join Date: Mar 2007
Location: Toronto, Canada
Posts: 2,380
Quote:
Originally Posted by Annihilannic View Post
Or:


Code:
echo $(<filename)


Code:
$ printf "%s\n" 1 2 3 4 5 > filename
$ echo $(<filename)

$ echo $(cat < filename)
1 2 3 4 5
$

When posting non-standard solutions, please specify which shell you are using.