BASH-通过多种模式选择文件 [英] BASH - file selection by multiple patterns in zenity

查看:106
本文介绍了BASH-通过多种模式选择文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对zenity和bash还是很陌生.我试图使文件选择窗口将只显示扩展名为.ogg,.aac和.wav的文件.我试过了,但是没有用.

Im pretty new to zenity and bash. Im trying to make file selection window that will display only the ones with .ogg, .aac and .wav extension. I tried this, but it doesn't work.

option=`zenity --file-selection --file-filter=*.ogg | *.aac`

对于一个扩展,它按预期工作:

For one extension it's working as intented:

option=`zenity --file-selection --file-filter=*.ogg`

Zenity男子提供信息:

Zenity man provides information:

--file-filter=NAME | PATTERN1 PATTERN2
Sets a filename filter

我真的不明白我应该怎么使用它.有人可以告诉我一些例子吗?

I dont really understand how am I supposed to use it. Can someone show me some examples?

推荐答案

好,我找到了解决方案,也许将来有人会使用它:

Ok I found the solution, maybe someone will use it in the future:

zenity --file-selection --file-filter=""*.ogg" "*.wav" "*.aac""

这篇关于BASH-通过多种模式选择文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆