Odoo18-Base/setup/dir2file.sh
hoangvv 5630ab904e
All checks were successful
Setup Native Action / native (3.12.7) (push) Has been skipped
Setup Native Action / docker (3.12.7) (push) Has been skipped
update :
2025-03-05 09:36:25 +07:00

10 lines
352 B
Bash
Executable File

#!/bin/bash
# Define output file name
input_dir="$1"
output_file="$2"
# Find all directories in root and write to file
# Using find to list only directories (-type d) at depth 1 (-maxdepth 1)
find $input_dir -maxdepth 1 -type d -not -path "$input_dir" -exec basename {} \; | sort >> "$output_file"
echo "Folder list has been written to $output_file"