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