chore: put dispaly help in function

This commit is contained in:
Krzysztof Rudnicki 2022-03-18 13:26:33 +01:00
parent 58686dccc4
commit c9d16e53f6

View File

@ -1,6 +1,8 @@
#!/bin/bash #!/bin/bash
while getopts ":h" option; do show_help() {
local OPTIND
while getopts ":h" opt ; do
echo "This script modifies file names" echo "This script modifies file names"
echo "-l lowerize file names" echo "-l lowerize file names"
echo "-u uppercase file names" echo "-u uppercase file names"
@ -8,3 +10,6 @@ while getopts ":h" option; do
echo "[-r] <sed pattern> specify sed pattern that will be executed on file names" echo "[-r] <sed pattern> specify sed pattern that will be executed on file names"
echo "-h show this help information" echo "-h show this help information"
done done
}
show_help "$@"