Bash Help
by TBotNik from LinuxQuestions.org on (#54QK4)
All,
Have this script to pull version from the system:
Code:for line in $lines; do
if [[ "$line" =~ "VERSION_ID=" ]]; then
ver=${line:11:5}
echo "$ver"
fi
done < cat "/etc/os-release"But it produces this error string:
Quote:
By all the HOWTOs this is suppose to work, but since it says "syntax" gotta be something simple, right?
if it is obvious to you, please help!
Cheers!
TBNK


Have this script to pull version from the system:
Code:for line in $lines; do
if [[ "$line" =~ "VERSION_ID=" ]]; then
ver=${line:11:5}
echo "$ver"
fi
done < cat "/etc/os-release"But it produces this error string:
Quote:
syntax error near unexpected token `"/etc/os-release"' done < cat "/etc/os-release"' |
if it is obvious to you, please help!
Cheers!
TBNK