#!/bin/bash plikName=$1 x=1 while [ $x -le 30 ] do sleep 1 ps --no-headers -o '%cpu' -C vlc >> $plikName ; x=$(( $x + 1 )) done