I try to set a user defined variable but it understands a command
I try to set a variable with the result of a command but It doesn´t works.
When I write the name of the variable in these ways:
hip = `cat something.txt`
echo "The content is '$hip'"
or
hip = $(cat something.txt)
echo "The content is '$hip'"
the shell says "hip command not found" and points to the first line
and when I write the name of the variable after in these ways:
set hip = `cat something.txt`
echo "The content is '$hip'"
or
set hip = $(cat something.txt)
echo "The content is '$hip'"
the shell shows:
The content is ''
what's wrong?
Thanks in advance.
|