2011-05-12 3 views
0

다음 코드는 "hello world"를 출력하지 않습니다. 표준을 사용하고 싶지 않다면 사용하고 싶지 않습니다.쉘에 변수 추가

#!/bin/sh 

message="hello " 
message.="world" 

echo $message 

답변

4
당신이 달성하기 위해 변수 확장을 사용할 수 있습니다

:

#!/bin/sh 

message="hello " 
message="${message}world" 

echo $message 
0

다음 작품 :

#!/bin/sh 

message="hello " 
message="$message world" 

echo $message