Skip to content

Commit ea6ccca

Browse files
authored
Merge pull request #111 from funnyzak/main
add search files and process spec
2 parents e6bac69 + a43353d commit ea6ccca

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Search for specified file types and run a certain command for each file
3+
command: "find -E {{path}} -iregex \".*\\.({{extensions}})\" -print | xargs -n1 -I _item {{command}} _item"
4+
tags:
5+
- shell
6+
description: Use the Find command to search for specified file types and run a certain command for each file
7+
arguments:
8+
- name: path
9+
description: The path to search for files.
10+
default_value: .
11+
- name: extensions
12+
description: The file extensions to search for.
13+
default_value: jpg|jpeg|png|bmp
14+
- name: command
15+
description: The command to execute on each file.
16+
default_value: echo
17+
source_url: "https://linuxize.com/post/how-to-find-files-in-linux-using-the-command-line/"
18+
author: funnyzak
19+
author_url: "https://github.com/funnyzak"
20+
shells: []

0 commit comments

Comments
 (0)