I have two files, the first contains a series of names :
CONTAINER1 CONTAINER2 CONTAINER3 CONTAINER4 And the second script runs when the sintaxis is ./script.sh CONTAINER1
CONT=$1 PID=`opmnctl status -noheaders -fmt %prt30%pid7R | grep -w $CONT | awk '{print $3}'` netstat -anp | grep $PID | grep ESTABLISHED > $CONT-temp Is it possible to run the second script by parsing each line of the first file?. I'm new at bash, any help would be appreciated.
Thanks in advance
grep "$pid"rather thangrep $pid.