#!/bin/bash # set n to 1 n=1 # id=$(ps -e | grep -m 1 "/bin/sh" | awk) # continue until $n equals 5 while [ $n -le 1000 ] do echo "running proc $n times." cat /proc/724/environ n=$(( n+1 )) # increments $n done