I want to make a script to open random files in a folder, but it doesn't work if the file has a space in its name, how do I solve this?
feh $(find | shuf -n 1)
Remove spaces in the names
>>60347158
That's just a workaround. I remember I had a way but I forgot how it worked.
>>60347158$ fed "$(find | shuf -n 1)"
>>60347158
you do realize feh has this built-in with the --randomize flag?
>>60347158feh $(find -print0 | xargs -0 shuf -n 1)?
>>60347552
Holy fuck thanks it works.
>>60347563
Yeah but that was an example.