Reputation: 43
cat file
$VAR
cat script
#!/bin/bash CONTENT=$(<file) echo $CONTENT
./script
I'd like to get the variable's actual value, not "$VAR". How to get a weaker quoting? Many thanks!
Upvotes: 4
Views: 5078
Reputation: 43508
This should do it:
CONTENT=$(eval echo -e `<file`)
Upvotes: 3