Generation

linuxWed, 08 Feb 2023

execute a command in loop using watch command and start with line containing a text

watch -n1 "ps -ef | grep -i 'text_to_search' | grep -v 'grep' | grep -v 'watch' | awk '{print $2}'"

Want to kickstart your project?Use the new AI Studio to create your code