shell 命令输出

shell 命令输出

process.sh

#!/usr/bin/env bash
echo "Hello $USER"
echo "Hey i am $USER and will be telling you about the current processes"
echo "Running processes List"
ps

执行:

$ bash process.sh 
Hello root
Hey i am root and will be telling you about the current processes
Running processes List
   PID TTY          TIME CMD
  6898 pts/0    00:00:00 bash
 29530 pts/0    00:00:00 bash
 29531 pts/0    00:00:00 ps

猜你喜欢

转载自blog.csdn.net/xixihahalelehehe/article/details/125162248
今日推荐