update
This commit is contained in:
parent
1f1ad49427
commit
6f050a029e
2496 changed files with 37609 additions and 3031 deletions
6
Task/Reverse-a-string/UNIX-Shell/reverse-a-string.sh
Normal file
6
Task/Reverse-a-string/UNIX-Shell/reverse-a-string.sh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
str=abcde
|
||||
|
||||
for((i=${#str}-1;i>=0;i--)); do rev="$rev${str:$i:1}"; done
|
||||
|
||||
echo $rev
|
||||
Loading…
Add table
Add a link
Reference in a new issue