I am trying to create a diff file the following way:
hdiff.pl -nx $FILEDIR/*filename* *filename* > diff_*filename*
However I need to run this command on 150 different files to create 150 different diff files. I am attempting to write a script to execute that will create all of the files for me but I am not sure what to put so that the command is recursive and uses all of the files in the directory.
I tried making a script to execute but it is looking like I just have to write out every individual command and then execute the script.
Edit:
To clarify, I am trying to avoid writing 150 lines of this:
hdiff.pl -nx $FILEDIR/*filename1* *filename1* > diff_*filename1*
hdiff.pl -nx $FILEDIR/*filename2* *filename2* > diff_*filename2*
hdiff.pl -nx $FILEDIR/*filename3* *filename3* > diff_*filename3*
*filename1*, do you mean that as a glob, or a standin for a specific filename?*s are shell syntax, so trying to use them as formatting is a fast route to confusion;*filename*isn't a generic "insert a filename here" signifier; instead, it means "insert a list of all the filenames that have 'filename' inside them here".