RSS Amplifier

Recent Questions - Unix & Linux Stack Exchange · Jun 30, 2017

extglob negation not working as expected

0
Sign in to vote or save

This page did not load. You can still read it on the original site — the toolbar below keeps your place in the directory.

I was trying to use negation to exclude directories from globbing, but directories still appear in pattern match: bash-4.3$ ls file_1.txt testdir bash-4.3$ shopt extglob extglob on bash-4.3$ echo !(*/) file_1.txt testdir bash-4.3$ What exactly am I doing wrong ? Note:I know I can use for loop with [ or find command, but I'm trying to figure out extglob specifically.

Read on unix.stackexchange.com

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.