Demo entry 6636629

11111

   

Submitted by 1111 on Aug 28, 2017 at 18:26
Language: Bash. Code size: 193 Bytes.

#!/bin/bash

cat data|while read LINE
do
	echo $LINE

	if [[ $LINE =~ [0-9]+ ]]
	then
		echo "Match"
		echo ${BASH_REMATCH[0]}
		kill -9  ${BASH_REMATCH[0]}

	else
		echo "Not match"
	fi

done

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).