Quick actions

cmd+k|ctrl+k

Navigation

Languages

String

Snippet info

Language

Bash

Visibility

public

Author

yahiko

Created

2018-07-06T02:56:29Z

Updated

2018-07-06T03:06:21Z

s1=string
s2='string'
s3="string"

echo "s1: \"${s1}\":  ${#s1}"
echo "s2: \"${s2}\":  ${#s2}"
echo "s3: \"${s2}\":  ${#s3}"

s="abcdefabc"
ss=${s/abc/hello}
echo ${ss}

ss=${s//abc/hello}
echo ${ss}

ss=${s/#abc/hello}
echo ${ss}

ss=${s/%abc/hello}
echo ${ss}
INFO