added -v option to list created files

This commit is contained in:
mintycube 2023-09-25 17:35:54 +05:00
parent f6561b5721
commit 798ffbd7ac
2 changed files with 8 additions and 3 deletions

View File

@ -14,6 +14,8 @@ ff is a bash script which is a combination of 'mkdir' and 'touch'. It can create
```bash ```bash
ff [path file or folder] ff [path file or folder]
--help : prints usage info
-v : prints created files
``` ```
## Examples ## Examples

9
ff
View File

@ -4,7 +4,10 @@
# █▀▀ ▄▀█ █▀ ▀█▀ █▀▀ █ █ █▀▀ █▀ # █▀▀ ▄▀█ █▀ ▀█▀ █▀▀ █ █ █▀▀ █▀
# █▀ █▀█ ▄█ █ █▀ █ █▄▄ ██▄ ▄█ # █▀ █▀█ ▄█ █ █▀ █ █▄▄ ██▄ ▄█
# #
# Usage: ff [path file or folder] # Usage: ff [option] [path file or folder]
#
# --help : prints usage info
# -v : prints created files
# #
# Description: Bash script which is a combination of 'mkdir' and 'touch'. # Description: Bash script which is a combination of 'mkdir' and 'touch'.
# It can create directory structures and files simultaneously # It can create directory structures and files simultaneously
@ -98,7 +101,7 @@ fi
createObjects "$@" createObjects "$@"
# Only print created files if executing directly from the command line. # Only print created files if "-v" (verbose) is the first argument
if [[ "${BASH_SOURCE[0]}" == "$0" ]]; then if [[ "$1" == "-v" ]]; then
listObjects "$@" listObjects "$@"
fi fi