新手问题:怎么不执行pwd?
发表于 : 2007-09-13 12:18
我照着打的第一个Shell脚本,可它怎么不执行pwd, uname -n啊?直接当成字符打出来了。需要作什么配置吗?谢谢。
输出是这样的:
代码: 全选
#!/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'!