find_ext : fix for hidden files.

This commit is contained in:
Dmitry Voronin 2023-11-25 23:24:09 +03:00
parent 392da9769f
commit 4c66a9c553
2 changed files with 10 additions and 4 deletions

View file

@ -486,12 +486,18 @@ Command|Description
---|---
`ffmpeg_mux_audio <SOUND> <RESULT>`|Mux external audio into one container with video (replaces original audio). Run inside dir with original video. <SOUND> names should be the same for each video.
## Files.
## File.
Command|Description
---|---
`o <FILE>`|Open file with the default GUI app.
## Find.
Command|Description
---|---
`find_ext`|Find all file extensions recursively.
## Fix.
Contains simple fixes for various issues.

View file

@ -1,7 +1,7 @@
# Find all file types recursively.
find_types()
# Find all file extensions.
find_ext()
{
local types=($(find -type f | sed "s/.*\.//"))
local types=($(find -type f | sed -e "s/.*\///" -e "s/^\.//" -e "/\./!d" -e "s/.*\.//"))
echo "${types[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '
echo
}