diff options
| author | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
|---|---|---|
| committer | Martial Simon <msimon_fr@hotmail.com> | 2025-09-15 01:08:27 +0200 |
| commit | c9b6b9a5ca082fe7c1b6f58d7713f785a9eb6a5c (patch) | |
| tree | 3e4f42f93c7ae89a364e4d51fff6e5cec4e55fa9 /rushs/tinyprintf/generate_files | |
add: graphs et rushs
Diffstat (limited to 'rushs/tinyprintf/generate_files')
| -rwxr-xr-x | rushs/tinyprintf/generate_files/generate_files.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/rushs/tinyprintf/generate_files/generate_files.sh b/rushs/tinyprintf/generate_files/generate_files.sh new file mode 100755 index 0000000..cf2ba0a --- /dev/null +++ b/rushs/tinyprintf/generate_files/generate_files.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +FILENAME="default" +NUMBER="1" +EXTENSION="txt" + +while [ $# -gt 0 ]; do + case "$1" in + '-f' | '--filename') + shift + FILENAME="$1" + shift + ;; + '-n' | '--number') + shift + NUMBER="$1" + shift + ;; + '-e' | '--extension') + shift + EXTENSION="$1" + shift + ;; + *) + exit 1 + ;; + esac +done + +for i in $(seq 1 $NUMBER); do + touch -- "$FILENAME-$i.$EXTENSION" +done |
