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}'"

Questions about programming?Chat with your personal AI assistant