How can I replace a specific character in one string, with a specific character from another string? | s1=${s1:0:2}${s2:3}${s1:3}
ubu1404@ubuntu1404lb01:~$ s1="abcd"
ubu1404@ubuntu1404lb01:~$ s2="xwyz"
ubu1404@ubuntu1404lb01:~$ s1=${s1:0:2}${s2:3}${s1:3}
ubu1404@ubuntu1404lb01:~$ echo $s1
abzd
ubu1404@ubuntu1404lb01:~$ s2="xwyz"
ubu1404@ubuntu1404lb01:~$ s1=${s1:0:2}${s2:3}${s1:3}
ubu1404@ubuntu1404lb01:~$ echo $s1
abzd
Comments
Post a Comment