Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8744909
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:55:08+00:00 2026-06-13T11:55:08+00:00

Thank you very much in advance for helping! I have this code in bash:

  • 0

Thank you very much in advance for helping!

I have this code in bash:

for d in this_folder/*    
    do    
        plugin=$(basename $d)
        echo $plugin'?'
        read $plugin
    done

Which works like a charm. For every folders inside ‘this_folder’, echo it as a question and store the input into a variable with the same name.

But now I’d like to exclude some folders, so for example, it will ask for every folder in that directory, ONLY if they are NOT any of the following folders: global, plugins, and css.

Any ideas how can I achieve this?

Thanks!

UPDATE:

This is how the final code looks like:

base="coordfinder|editor_and_options|global|gyro|movecamera|orientation|sa"

> vt_conf.sh
echo "# ========== Base"     >> vt_conf.sh
for d in $orig_include/@($base)
do
    plugin=$(basename $d)
    echo "$plugin=y"         >> vt_conf.sh
done
echo ''                      >> vt_conf.sh
echo "# ========== Optional" >> vt_conf.sh
for d in $orig_include/!($base)
do
    plugin=$(basename $d)
    echo "$plugin=n"         >> vt_conf.sh
done
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:55:09+00:00Added an answer on June 13, 2026 at 11:55 am

    If you have a recent version of bash, you can use extended globs (shopt -s extglob):

    shopt -s extglob
    
    for d in this_folder/!(global|plugins|css)/   
    do    
        plugin=$(basename "$d")
        echo $plugin'?'
        read $plugin
    done
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Thank you very much in advance for helping! I have this variables: scene1=lounge scene2=bedroom
Thank you very much in advance for helping! I have a directory with some
Thank you very much in advance for helping! I'd like to transform this variable:
thank you very much in advance for the help. I have to make an
Thank you very much in advance for helping! I'm a happy user of Emacs
First of all, thank you very much in advance for any attempt at helping
Thank you very much in advance for reading. I'm programming a web application in
i have very serious problem if any tech expert can help...thank you in advance..
First and foremost, thank you all for reading this and helping, I'm very grateful.
Thank you very much in advance. I'd like to know if anyone knows about

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.