0

This question is loosely related to this post. The basic idea is that OP had - in filename which broke ls *.vcf. What happened is clearly understood, but the question is then, how could one 'protect' or anticipate such filenames with the wildcard expansion ? I know one could use find , but what about wildcard expansion in shell specifically ?

marked as duplicate by Sergiy Kolodyazhnyy, DopeGhoti, Jeff Schaller, Community May 10 '17 at 18:44

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • @don_crissti well . . . that was so obvious that I just feel stupid. Write an answer. – Sergiy Kolodyazhnyy May 10 '17 at 18:39
  • or ls -- ... ... – Jeff Schaller May 10 '17 at 18:42
  • ls -- *.vcf. -- is an argument which is available in many commands which is understood to mean "no more switches starting with - from this point". – DopeGhoti May 10 '17 at 18:43
  • @JeffSchaller that's not 100% reliable, not all commands have that option. But yeah . . .it's a dupe of what don_crissti linked. Just VTC – Sergiy Kolodyazhnyy May 10 '17 at 18:43