分页: 1 / 1

新手问题:怎么不执行pwd?

发表于 : 2007-09-13 12:18
eklipseguy
我照着打的第一个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'!


发表于 : 2007-09-13 12:19
windwiny
单引号 '
反引号 `

发表于 : 2007-09-13 12:20
bones7456
反引号 `就是1的左边那个键。。。

发表于 : 2007-09-13 12:56
magicsky
``

发表于 : 2007-09-13 13:03
eklipseguy
收到,谢谢你们! :)