-- Leo's gemini proxy

-- Connecting to freeshell.de:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini;lang=en-GB

expr


> Evaluate expressions and manipulate strings.

More information.


Get string length:

expr length {string}

Evaluate logical or math expression with an operator ('+', '-', '*', '&', '|', etc.). Special symbols should be escaped:

expr {first_argument} {operator} {second_argument}

Get position of the first character in 'string' that matches 'substring':

echo $(expr index {string} {substring})

Extract part of the string:

echo $(expr substr {string} {position_to_start} {number_of_characters}

Extract part of the string which matches a regular expression:

echo $(expr {string} : '\({regular_expression}\)')


> Copyright © 2014—present the tldr-pages team and contributors.

> This work is licensed under the Creative Commons Attribution 4.0 International License (CC-BY).

CC-BY



-- Response ended

-- Page fetched on Fri May 17 17:27:05 2024