1
The question is as simple as the logic I have here.
Logic:
Assuming that files should always contain their suffix . png . txt etc...
While folders/directories carry nothing but their format name
The idea is this, take such referenced names and set a type icon: if it is a directory, set a folder icon. Now, if it’s a file with extension, set a file icon.
Could someone please show me how I can draft a shell bash script so as to detect what is what inside a directory : file and folder
For archives:
[[ -f "seu-arquivo" ]] && echo "É um arquivo"
; folder[[ -d "sua-pasta" ]] && echo "É uma pasta"
– Valdeir Psr