The following is what I'm currently using for testing the version of Debian. Instead of doing it this way, can I make it more succinct?#!/bin/bashVERSION=NONEif [ $(cat /etc/debian_version) == '7.3' ]; then  VERSION=7elif [ $(cat /etc/debian_version) == '7.2' ]; then  VERSION=7elif [ $(cat /etc/debian_version) == '7.1' ]; then  VERSION=7elif [ $(cat /etc/debian_version) == '7.0' ]; then  VERSION=7fiI know it's not the most attractive way of doing this. What I want, is to understand how to use the file at /etc/debian_version to read the version number before the . and ignore the number after.I tried usingif [ $(cat /etc/debian_version) == '7.*' ]; thenand I also tried if [ $(cat /etc/debian_version) == '7.2|7.1|7.0' ]; thenBut neither of these worked for me. I want to future proof my script so that if Debian 7.4 gets released, then I won't have to go back over all the scripts that rely on this and alter themI am also aware of the lsb_release -a showing me the relative information, I just don't know how to cut what I want from that and check that it is Debian 6 or 7. The original script, as you can imagine, is quite lengthy.Any other posts you can point me to, would also be appreciated with using the method of cutting apart the response to only section out the part that I want. 
Bash Script To Find Debian Release Number from /etc/debian_version
bash;debian;awk;bash script
There are many ways to do what you want.  This one just removes the decimal point and everything after from the version number:VERSION=$(sed 's/\..*//' /etc/debian_version)\..* means a period (\.) followed by zero or more of any character (.*).  Thus, for sed, the expression s/\..*// means replace the period and all that follows with nothing.  The result of the sed command is saved in the environment variable VERSION.The above eliminates the need for the if/then/elif/.../fi statements.  It will work with both bash and ordinary /bin/sh.MORE: sed is a stream editor: that means it reads lines from stdin, edits them as per instructions, and (typically) sends them to stdout.  In this case, we are giving it a substitute instruction.  For example, s/foo/bar/ means find the first occurrence of foo and replace it with bar.  As a special case, s/foo// means replace foo with nothing.  In our case, we want to replace a period followed by any character with nothing.  Now, a period is . except that sed normally treats a period to mean any character.   So, we need to escape it by putting a backslash ahead of it.  When sed sees \., it knows that we mean a literal period.  We also want to erase any characters following the period.  To represent any character, we use a period . (no escape).  To be general, though, we want to delete all the characters following the period, regardless of how many there are.  So, while in sed's language, a period means any character, the star means any number of the preceding character (which could be zero).  Thus period-star .* means zero or more of any character.  So, putting it all together, s/\..*// tells sed that if it finds a period, possibly followed by anything, then replace it with nothing.