#!/bin/sh
#search for .h files in a specific directory
#For each file in this dir, list first 3 lines in the file
#into the file "myout"

FILE_LIST=`ls /home/ad/Courses/Sys.Pro10/Sources/bash-scripts/tmp/*.h`

touch myout; rm myout; touch myout;

for file in ${FILE_LIST}
  do
  	echo ${file};
      	head -3 "${file}" >> myout;
  done

