#!/bin/bash CTID=100 #CTID=$1 FILE=/opt/test if pct exec $CTID -- test -f $FILE ; then echo "File exists in $CTID" else echo "File does not exist in $CTID." fi