File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1011,17 +1011,17 @@ ${varname:offset:length} # 部分文字列展開を行う。これは、offse
10111011```
10121012
10131013## 2.3 String Substitution
1014-
1014+ 文字列を操作する方法の構文をチェック
10151015Check some of the syntax on how to manipulate strings
10161016
10171017``` bash
1018- ${variable# pattern} # if the pattern matches the beginning of the variable's value, delete the shortest part that matches and return the rest
1019- ${variable## pattern} # if the pattern matches the beginning of the variable's value, delete the longest part that matches and return the rest
1020- ${variable% pattern} # if the pattern matches the end of the variable's value, delete the shortest part that matches and return the rest
1021- ${variable%% pattern} # if the pattern matches the end of the variable's value, delete the longest part that matches and return the rest
1022- ${variable/ pattern/ string} # the longest match to pattern in variable is replaced by string. Only the first match is replaced
1023- ${variable// pattern/ string} # the longest match to pattern in variable is replaced by string. All matches are replaced
1024- ${# varname} # returns the length of the value of the variable as a character string
1018+ ${variable# pattern} # パターンが変数の値の先頭に一致する場合は、一致する最も短い部分を削除し、残りの部分を返す
1019+ ${variable## pattern} # パターンが変数の値の先頭に一致する場合は、一致する最も長い部分を削除し、残りの部分を返す
1020+ ${variable% pattern} # パターンが変数の値の終わりと一致する場合は、一致する最も短い部分を削除し、残りの部分を返す
1021+ ${variable%% pattern} # パターンが変数の値の終わりと一致する場合は、一致する最も長い部分を削除し、残りの部分を返す
1022+ ${variable/ pattern/ string} # 変数の中で最も長いパターンが文字列に置き換えられる。最初の一致のみ置換される
1023+ ${variable// pattern/ string} # 変数の中で最も長いパターンが文字列に置き換えられる。全ての一致が置換される
1024+ ${# varname} # 変数の値の長さを文字列として返す
10251025```
10261026
10271027## 2.4. Functions
You can’t perform that action at this time.
0 commit comments