-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 29 April 2002 09:39 pm, Cameron Simpson wrote: > |On 17:58 29 Apr 2002, christopher j bottaro <[EMAIL PROTECTED]> wrote: > | i wanna get this sudo (sp?) code working... > | > | EXCLUDE_LIST = "dir1 dir2 dir3" > | for DIR in `ls -d */` ; do > | if [ $DIR in $EXCLUDE_LIST ] ; then > | continue; > | fi > | echo $DIR > | done > > case " $EXCLUDE_LIST " in > *" $DIR "*) echo in list ;; > esac
I believe he is trying to list everything not included in $EXCLUDE_LIST In which case he wants something like: EXCLUDE_LIST="dir1/ dir2/ dir3/" # You'll need the trailing / for DIR in `ls -d */` ; do case " $EXCLUDE_LIST " in *" $DIR "*) continue ;; esac echo $DIR done - -- - -Michael pgp key: http://www.tuxfan.homeip.net:8080/gpgkey.txt Red Hat Linux 7.2 in 8M of RAM: http://www.rule-project.org/ - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iEYEARECAAYFAjzOA0wACgkQn/07WoAb/SvgggCdHYER0e3cWbvJv9DYTVIKie6r 1LMAnRe7HtfXHQn5GFavNofmGp2NXBJN =ry5b -----END PGP SIGNATURE----- _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list