In bash, you can use the arithmetic expression
: ((...))
if ((461<=X && X<=660))
then
echo "480p"
elif ((661<=X && X<=890))
then
echo "720p"
elif ((891<=X && X<=1200))
then
echo "1080p"
else
echo "DVD"
fi >> moviefinal
More Related Contents:
- Is there a list of ‘if’ switches anywhere?
- Switch case with fallthrough?
- Correct Bash and shell script variable capitalization
- Using getopts to process long and short command line options
- How do I compare two string variables in an ‘if’ statement in Bash? [duplicate]
- Propagate all arguments in a bash shell script
- Associative arrays: error “declare: -A: invalid option”
- How to put a line comment for a multi-line command [duplicate]
- How to calculate time elapsed in bash script?
- How to get Maven project version to the bash command line
- Recursively rename files using find and sed
- In bash, how do I bind a function key to a command?
- How do I get the directory where a Bash script is located from within the script itself?
- Bash: Syntax error: redirection unexpected
- Difference between return and exit in Bash functions
- bash variable interpolation separate variables by a hyphen or underscore
- How to kill all subprocesses of shell?
- $BASH_VERSION reports old version of bash on macOS, is this a problem that should be fixed?
- How to store the output of a command in a variable at the same time as printing the output?
- Convert Unix timestamp to a date string
- Extract version number from a string
- Looping over arrays, printing both index and value
- Temporarily change current working directory in bash to run a command [duplicate]
- Generating random number between 1 and 10 in Bash Shell Script [duplicate]
- How to break out of a loop in Bash?
- How to assign a glob expression to a variable in a Bash script?
- Access arguments to Bash script inside a function [duplicate]
- What’s the difference between “here string” and echo + pipe
- Show Hexadecimal Numbers Of a File
- How to get the PID of a process in a pipeline