#!/bin/bash echo "请输入内容,exit退出: " read -p ">" cmd until [ $cmd == "exit" ]; do echo "$cmd" read -p ">" cmd done