hop-frog
12-23-2003, 04:43 AM
Here is, much simplified, my situation:
file1 contains:#!/bin/bash
NAME="Dave"
GREETING="`tail +1 file2 | head -1`"
echo $GREETING file2 is just a data file containing the sentence structure for the greeting:Good morning, $NAME.When I run ./file1 it should be printing, "Good morning, Dave."
Instead this prints out, "Good morning, $NAME." (dollar sign included) How do I get it to replace $NAME with Dave when read from a file?
file1 contains:#!/bin/bash
NAME="Dave"
GREETING="`tail +1 file2 | head -1`"
echo $GREETING file2 is just a data file containing the sentence structure for the greeting:Good morning, $NAME.When I run ./file1 it should be printing, "Good morning, Dave."
Instead this prints out, "Good morning, $NAME." (dollar sign included) How do I get it to replace $NAME with Dave when read from a file?