Linux Format

Add selecting and printing file dialogs

YAD

Credit: https://github.com/v1cont/yad

OUR EXPERT

Karsten Günther loves pretty things, so he loves making terminal tools a little prettier for use with YAD.

Usually files processed by shell scripts are selected either by the user or with name patterns. The calling shell interprets the name patterns and takes over the file paths. YAD offers the ability to use a GUI way of specifying files in a dialog. However, when it comes to multiple file names as well as file names containing spaces, an extra level of complexity has to be dealt with. When selecting files manually, the shell usually masks such filenames automatically when completing the selection, but the main problem remains: saving paths with spaces so that they can be used later.

No matter how a group of files is obtained, their names – or entire paths – must be stored for processing. As a structure for such data, BASH offers simply indexed arrays (there are also others). BASH creates an array whenever a variable assignment is created in the form ARRAY=( E lemente) . The individual elements of the array are accessed in the form ${ARRAY[INDEX]} . The INDEX starts at zero and automatically ends with the number of the

You’re reading a preview, subscribe to read more.

More from Linux Format

Linux Format1 min read
Kaki Pi
Another Pi-like SBPC appears! From Yuridenk-Shokai in Japan, this packs a Renesas RZ/V2H Coretex-A55/R8/M33 MPU with 80 TOPS of AI. It’s aimed at robotics and has four CSI video inputs along with a PCIe 3 connection. Find out more in Japanese: www.ka
Linux Format11 min readInternet & Web
Ultra-smooth Home Game Streaming
Credit: https://moonlight-stream.org, https://github.com/LizardByte Michael Reed is a consummate Linux professional who has been moonlighting for us so that he can live in the sunshine. (are we actually paying for these gags?–Ed) You can install the
Linux Format1 min read
Nvidia Moves To Block ZLUDA
As more and more applications rely on the combination of Nvidia and CUDA, it was inevitable that third-parties would try to build on their success. There’s already examples of this, such as ZLUDA, a drop-in replacement for CUDA. The implications of

Related