SHELL腳本練習

編寫一個腳本,它可讓用戶輸入first name 和last name,最後在屏幕上顯示"Your full name is:"的內容。bash


#!/bin/bashide

#Function:spa

# User inputs his first name and last name,program shows his full name.input

#History:it

# 2015/01/24 xiao V0.1io


PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/binast

export PATHclass


read -p "Please input your first name: " filename           #提示用戶輸入file

read -p "Please input your last name: " lastname     #提示用戶輸入腳本

echo -e "\nYour full name is: $filename $lastname"

exit 0

相關文章
相關標籤/搜索