mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-06 17:43:03 +02:00
fix: proper use of -h flag
This commit is contained in:
parent
c9d16e53f6
commit
a9ed60fa32
@ -1,14 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Function to detect -h flag and show help for this script
|
||||||
show_help() {
|
show_help() {
|
||||||
local OPTIND
|
local OPTIND
|
||||||
while getopts ":h" opt ; do
|
while getopts ":h" opt ; do
|
||||||
echo "This script modifies file names"
|
case "$opt" in
|
||||||
echo "-l lowerize file names"
|
h )
|
||||||
echo "-u uppercase file names"
|
echo "This script modifies file names"
|
||||||
echo "-r recurse into directory"
|
echo "-l lowerize file names"
|
||||||
echo "[-r] <sed pattern> specify sed pattern that will be executed on file names"
|
echo "-u uppercase file names"
|
||||||
echo "-h show this help information"
|
echo "-r recurse into directory"
|
||||||
|
echo "[-r] <sed pattern> specify sed pattern that will be executed on file names"
|
||||||
|
echo "-h show this help information"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user