1

I want to run a for loop, is there a way to do a nullglob in the korn shell like in other shells?

for file in docs*.txt; do
  • 1
  • 1
    Yes, as seen in the answers to the questions marked as duplicates. Prefix the pattern with ~(N). – Kusalananda May 8 at 13:43
  • 1
    @JeffSchaller When ksh is mentioned without any other qualifier, I'm assuming ksh93. – Kusalananda May 8 at 13:44
  • 1
    83? Do you mean 88? On what Unix? – Kusalananda May 8 at 14:38
  • 1
    @Roland Do consider updating your question with the type of Unix you're using, the version of ksh that is in use, and whether ~(N)docs*.txt works as you want it to or not. Unfortunately there are a number of various ksh shells (ksh88, ksh93, pdksh and mksh), and they work slightly differently compared to each other. – Kusalananda May 8 at 14:48

Browse other questions tagged or ask your own question.