This is my shell script:$EXTENSION=$(file $RADIOOUT)$RADIOOUT contains the file name along with its path.output is:./zenityentry: line 40: =/home/jeevan/Downloads/p.txt:: No such file or directory
Trying to store the output of file command into a variable , but the output says no such file exists?
linux;shell script
You need to remove the leading $ (and while we're at it, quote $RADIOOUT and avoid its being interpreted as an option to file if it starts with -):EXTENSION=$(file -- $RADIOOUT)