I have a perl script that converts a file to json format and writes the output to a separate directory. It accepts 2 parameters, filename and output directory. The script needs to be run on multiple files that end with a particular extension such as .abc.
I want to locate every file in a particular directory with extension .abc and run my script against it. I am trying to run from the command line
find "path to directory" -name '*.abc' -exec ./ConvertFile {} "output_directory"
The command returns find: missing argument to '-exec'
I am new to both perl and shell scripting. I could run the script on each individual file. However, there can be tens of files in any given directory and they will need to be converted on the fly because the original files change often. Can anyone tell me what is wrong with my command line entry? Thanks