代码: 全选
#!/bin/bash
#This is the first Bash Shell program of the day
#Scriptname:greetings
echo "Hello, $LOGNAME, it's nice talking to you."
echo "Your present working directory is 'pwd'."
echo "You are working on a machine called 'uname -n'."
echo "Here is a list of your files:"
ls
echo "Bye for now $LOGNAME. The time is 'date +%T'!"
代码: 全选
Hello, newguy. it's nice talking to you.
Your present working directory is 'pwd'.
You are working on a machine called 'uname -n'.
Here is a list of your files:
greeting.sh greeting.sh~
Bye for now newguy The time is 'date +%T'!