Hi ,
I know this is a noob question but I am not able to find a solution .
I have many scripts which are either shell or perl scripts .
I want to count the number of perl scripts . I am searching the first line from all the files
This is my idea
find . -type f -perm -700 | xargs awk 'NR == 1 && /perl/ {print $0}'
This is not giving any output . :wall:
How can I search a pattern only in the first line of several files using awk.
Thanks.