Search Results

Search: Posts Made By: fubaya
11,639
Posted By Chubler_XL
How about this: addspace () { ...
How about this:

addspace () {
LEN=${#1}
for ((c=0;c<$LEN;c++))
do
echo -n "${1:$c:1} "
done
echo ${1:$LEN:1}
}
addspace "abcdef"

And if your shell dosn't...
11,639
Posted By danmero
# cat script #!/bin/bash if [ $# -ne 1 ]...
# cat script
#!/bin/bash
if [ $# -ne 1 ] ;then
echo Usage: $0 [string];exit
fi
for ((s=0;s<${#1};s++))
do
case $final in
^.) final=${1:$s:1};;
...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 03:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy