summaryrefslogtreecommitdiff
path: root/bash/list_all_file.sh
blob: c9d88315dde0594b0a132ae19b4f50dc1f6f9806 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env sh

######################################################################
# @author      : Garhve (garhve@gmail.com)
# @file        : p
# @created     : Friday Nov 04, 2022 19:22:17 CST
#
# @description : 
######################################################################


function list() {
    for x in "$1"/*; do
        if [ -d "$x" ]; then
            echo "$x";
            list "$x"
        else
            echo "$x"
        fi
    done
}

list "$1"