KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have written the following lines to get the last character of a string: str=$1 i=$((${#str}-1)) echo ${str:$i:1} It works for abcd/ : $ bash last_ch.sh abcd/ / It does not work for abcd* : $ bash last_ch.sh abcd* array.sh assign.sh date.sh dict.sh full_path.sh last_ch.sh It lists the files in the current folder .
Tags (comma-separated)
Save Edits
Cancel