当前位置: 代码迷 >> 综合 >> linux中如何通过echo输出!(叹号)? -bash: !": event not found
  详细解决方案

linux中如何通过echo输出!(叹号)? -bash: !": event not found

热度:82   发布时间:2024-01-26 16:12:34.0

linux中如何通过echo输出!(叹号)? -bash: !": event not found

 

例如

#!/bin/bash

echo "hello world!"

会报错 -bash: !": event not found

但是!前后加上空格,就不会报错了

echo "hello world ! "

  相关解决方案