Shell programming exercise: write a shell script that receives a string s and outputs the process with s in the name

Write a shell script that receives a string s and outputs the process with s in the name

#!/bin/sh
echo "Enter a string:"
read s
echo "Processes whose name includes "$s":"
ps aux | grep $s

Guess you like

Origin blog.csdn.net/COFACTOR/article/details/115255820