Relative Content

Tag Archive for shellzshglob

Glob pattern fails to match directory name

I have two servers and my computer where I can access both of them. I made a script where the shell ask the user to input a job number. Then all I need the script to do is copy the files from one dir to another. The problem is one of the dir in the file path to the files starts with the job number but ends with some stuff I don’t want the user to have to input.

How to use a glob pattern to find files in hidden directories using zsh

In zsh, echo **/asdf lists every file named asdf in the current directory and any subdirectories. But it doesn’t search subdirectories whose names start with .. For example it wouldn’t find .x/asdf. Is there a different pattern that can be used to also search hidden directories?