[ale] scripts, file I/O, and loss of hair
Geoffrey Myers
lists at serioustechnology.com
Fri May 13 08:03:42 EDT 2011
James Sumners wrote:
> Also:
>
> "When the old-style backquoted form of substitution is used, backslash
> retains its literal meaning except when followed by "$", "`", or "\".
> The first backticks not preceded by a backslash terminates the command
> substitution. When using the "$(COMMAND)" form, all characters between
> the parentheses make up the command; none are treated specially." --
> [1]
>
> $(echo "This is much nicer than backquotes.")
>
> [1] -- http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_04.html#sect_03_04_04
>
> On Thu, May 12, 2011 at 5:14 PM, The Don Lachlan
> <ale-at-ale.org at unpopularminds.org> wrote:
>> Also,
>>
>> directions=$(cat $2)
>>
>> should be replaced by
>>
>> directions=`<${1}`
I think the solution you want is:
directions=$(<${2})
--
Until later, Geoffrey
"I predict future happiness for America if they can prevent
the government from wasting the labors of the people under
the pretense of taking care of them."
- Thomas Jefferson
More information about the Ale
mailing list