课程: Learning Linux Shell Scripting
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Solution: Display a variable
- [Instructor] Hopefully this wasn't too difficult. Here is my solution to the challenge. We do a touch env.sh, change mode 755 env.sh and finally, atom env.sh. Enter the shebang, usr/bin/env bash and print out our one long sentence, echo the computer's name is $HOSTNAME, the user's name is $USER and the home directory is $HOME and then we do an exit 0 and do a control S to save. Go back to the terminal, /env.sh and we get the computer's name, the user's name and the home directory and that's it for that challenge.
随堂练习,边学边练
下载课堂讲义。学练结合,紧跟进度,轻松巩固知识。