We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b78d43 commit 9d8d2c5Copy full SHA for 9d8d2c5
string2.sh
@@ -0,0 +1,10 @@
1
+string_var="Hi Team, My name is Simon Legah, working in MLT, GTA "
2
+#echo "The value of string_var value is: " ${string_var}
3
+echo ${string_var}
4
+echo $string_var
5
+echo "The length of the string is: " ${#string_var}
6
+echo ${string_var:20:14} # This should display the string values between the first 20 characters and the last 14.
7
+echo ${string_var:20} # This should display the string excluding the first 20 characters.
8
+#Index from right end of the string
9
+echo ${string_var: -10} #This should display the last 10 characters in the string.
10
+echo ${string_var: -22} #This should display the last 22 characters in the string.
0 commit comments