#!/bin/bash PIPE_PATH=$1 if [ "${PIPE_PATH}" == "" ]; then echo "There is no defined path to pipe" exit 1 fi echo -n sysdig_stop > ${PIPE_PATH} cat ${PIPE_PATH} echo -n kill > ${PIPE_PATH} rm ${PIPE_PATH} if [ $? -ne 0 ]; then echo "Can't remove pipe" exit 1 fi