Bash: Print last two characters from string 28. November 201128. November 2011 prego Computer, zeugs user@desktop:~$ VAR=foobar user@desktop:~$ echo $VAR foobar user@desktop:~$ echo ${VAR: -2} aruser@desktop:~$ VAR=foobar user@desktop:~$ echo $VAR foobar user@desktop:~$ echo ${VAR: -2} ar Siehe auch: Bash: Delete last character from string Bash: Delete first character from string prego /me... prego!
Ein Gedanke zu „Bash: Print last two characters from string“