: [arguments]
No effect; the command does nothing beyond expanding arguments and performing any specified redirections. A zero exit code is returned.
#!/bin/bash
read value
: ${var=value}
echo $value
[beyes@localhost shell]$ sh colon_use.sh
yes
value
#!/bin/bash
rm -f fred
if [ -f fred ]; then
:
else
echo file fred did not exist
fi
exit 0
欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) | Powered by Discuz! X3.2 |