I got a few files to open and they are all in a folder filled with files with the same extension. My question is as the title says, but I'll provide an example:

yourprogram <filename1>.ext <filename2>.ext .... <filenameN>.ext &

Could be any program that opens these files, but the point is that I want to avoid typing their extension. Are there any short codes for just writing the file names and use something like *.ext* at the end?

Thanks in advance

  • do you mean that you can't glob because there are files with different extensions with the same names apart from the extension, or you don't want to open ALL the files with that extension?
    – Zanna
    Aug 29 '16 at 19:33
  • The latter, sorry for not being precise enough. It's easy to open all of them:)
    – Thomas
    Aug 29 '16 at 19:36

Simple as this:

yourprog {file1,file2,file3}.png

Note that this is intended only for files in current directory


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.