LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   BASH Command Result (https://www.linuxquestions.org/questions/programming-9/bash-command-result-219901/)

redhatnoob 08-19-2004 07:20 PM

BASH Command Result
 
I was trying to store a result of a command as a variable

START="cat start.txt"

./$START


But $START is the string. How do i put the result of cat as the variable?

start.txt is a one line text file with paramaters for a programs startup

ToniT 08-19-2004 07:24 PM

START=`cat start.txt`
or
START=$(cat start.txt)

jlliagre 08-19-2004 07:25 PM

START=`cat start.txt`
START=$(cat start.txt)
START=$(<start.tx)


All times are GMT -5. The time now is 07:47 PM.