![]() The other requirements around extracting the path from the filename could be done inside my_script or if it has to be done prior to my_script, by using bash string extraction or sed/awk/perl to reformat the output. ![]() usr/bin/splain: Perl script text executable The type info will be quite extensive, as can be seen in the following sample output from the xargs file step: /usr/bin/easy_install-3.8: Python script, ASCII text executable The xargs command has been used to minimise the number of exec's of the file command. The following example employs the file command to pass the name and type or each file to my_script: find /path -type f | xargs file | while read -r line do my_script $line done #FIND FILE TYPES FREE#However, on UNIX based systems the type of many commonly encountered files can be determined by the file command. CheckFileType Online - 100 Free
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |