I just came across this line of code in a script I'm working with, because I don't have vim installed: vim bots/*/run_bot where bots is a directory in the current working directory and run_bot is a script file inside a subfolder of bots
Isn't vim supposed to be an text editor? This line is inside an "installation script", so interaction with the user isn't going to work...

Any help is appreciated!

  • Can you show the lines before and after this, and the real syntax of your example.
    – Soren A
    Feb 19, 2017 at 19:58
  • I edited my question to explain the scenario a little bit more... The context won't help you much, because I believe this line isn't needed at all, maybe just a workaround to create a file or whatever
    – RoiEX
    Feb 19, 2017 at 20:05
  • That commend will just open one or more 'run-bot' files depending on what the wildcard '*' expands to ... there has to be something more going on. Please show the original line, and a few lines before and after it, from the script.
    – Soren A
    Feb 19, 2017 at 20:11
  • This command isn't preventing the script from being executed further, right? I believe that this is just a cheap way to test if this file exists, and error if it doesn't... earlier in the script file set -eu is executed
    – RoiEX
    Feb 19, 2017 at 20:16

1 Answer 1


This would do the following:

  1. Search through every folder in the bots folder for files named run_bot
  2. Open every matching file for editing in Vim


That means if you have the following hierarchy: bots/folder1/run_bot and bots/folder2/run_bot this command would be the equivalent of writing:

vim bots/folder1/run_bot 


vim bots/folder2/run_bot

It's pretty common to use the wildcard (*) sign when you want to open or edit several files. This is standard bash syntax.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .