User Tools

Site Tools


bash:how_to:start

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

bash:how_to:start [2018/08/02 22:41]
Rob Stroess working on it, lots still to come ...
— (current)
Line 1: Line 1:
-===== bash: "How To"===== 
-^operation^what^code^example using:\\ export TST='abcabcaa'^result from \\ abcabcaa^ 
-|remove|first occurence of characters '__xyz__' in string|STR=${STR/'__xyz__'}|echo ${TST/'bc'}|aabcaa| 
-|:::|all characters '__xyz__' in string|STR=${STR%%//%%'__xyz__'}|echo ${TST%%//%%'bc'}|aaaa| 
-|:::|characters '__xyz__' at end of string|STR=${STR/%__x__}|echo ${TST%'bcaa'}|abca| 
-|:::|first __n__ characters|STR=${STR:__n__}|echo ${TST:2}|cabcaa| 
-|:::|last __n__ characters|STR=${STR:-__n__}|echo ${TST::-3}|abcab| 
-|extract|all characters after position __n__|STR=${STR:__n__}|echo ${TST:1}|bcabcaa| 
-|:::|__m__ characters after position __n__|STR=${STR:__n__:__m__}|echo ${TST:1:5}|bcabc| 
-|:::|characters after position __n__ until end of string minus __m__|STR=${STR:__n__:-__m__}|echo ${TST:1:-1}|bcabca| 
- 
  

on the occasion of the current invasion of Russia in Ukraine

Russian Stop this War
bash/how_to/start.1533242474.txt · Last modified: 2024/02/16 01:02 (external edit)

Impressum Datenschutz