The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
interesting problem ChicagoBlues Shell Programming and Scripting 5 02-29-2008 11:40 AM
I have an interesting problem and need advice Maldain SCO 1 02-10-2007 08:56 AM
interesting problem rein UNIX for Advanced & Expert Users 3 02-16-2005 10:25 PM
An interesting problem jyotipg UNIX for Advanced & Expert Users 5 11-02-2001 01:00 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 07-05-2007
neked neked is offline
Registered User
  
 

Join Date: Feb 2005
Posts: 56
Interesting problem

Hello,

So I'm utilizing the bash brace expansion feature to checkout multiple folders from cvs with ease, while excluding certain subfolders within. So I do a command like this:

cvs co trunk/{mod_a,mod_b,mod_c} \!trunk/{mod_a,mod_b,mod_c}/web

to checkout modules trunk/mod_a , trunk/mod_b , and trunk/mod_c without the web subfolder within those modules. The question is: is there a way to compress the two brace expansions above into one? My first attempt was like:

{,\!}trunk/{mod_a,mod_b,mod_c}{,/web}

which understandably doesn't work. Can anybody think of a way to do this?

Neked
  #2 (permalink)  
Old 07-05-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,928

Code:
shopt -s nullglob extglob
cvs co trunk/mod_{a,b,c}/!(web)


Last edited by radoulov; 07-06-2007 at 04:47 AM.. Reason: correction
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:47 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0