Linux Commands Reference - Complete Linux Command Guide
Comprehensive Linux command reference with 150+ commands. Search, filter by category, and view detailed usage examples.
expr
Evaluate expressions
Syntax
expr EXPRESSION...Common Options
ARG1 + ARG2AdditionARG1 - ARG2SubtractionARG1 \* ARG2MultiplicationARG1 / ARG2Division (integer)ARG1 % ARG2ModuloARG1 = ARG2Equal (returns 1/0)ARG1 != ARG2Not equallength STRINGString lengthsubstr STRING POS LENGTHSubstringindex STRING CHARSFirst position of charsCommon Examples
expr 2 + 3Addition
expr 10 \* 5Multiplication
expr 10 / 3Integer division
expr 10 % 3Modulo operation
expr length "hello"Calculate string length
expr substr "hello" 2 3Extract substring
x=5; expr $x + 10Variable in expression
expr "abc" = "abc"String comparison
Related Tools
More Code & Dev Tools
Timestamp Batch Converter
Convert multiple timestamps at once. Batch process Unix time...
Code Share
Create and share code snippets online. Syntax highlighting a...
Cron Expression Generator
Generate and validate Cron expressions online. Convert Cron ...
IP Calculator
Calculate IP ranges, subnet masks, and CIDR notation. Networ...
Code Formatter
Format and beautify code online. Support multiple languages ...
Color Extractor
Extract colors from images online. Get dominant colors and c...
JavaScript Formatter
Format and beautify JavaScript code online. Improve code rea...
Code Analyzer
Analyze code quality online. Check for errors, warnings, and...
HTML Formatter
Format and minify HTML online. Beautify HTML code or compres...
Regex Cheatsheet
Quick reference for regular expression patterns. Character c...
SQL Formatter
Format and beautify SQL queries online. Improve SQL readabil...
CSS Gradient Generator
Generate CSS gradients online. Linear and radial gradients w...