Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Allen Brown
T. Joseph CARTER wrote: Allen, $() is not part of bourne shell, just for the record. True. I should have made that clear. But neither is the ${variable##pattern} syntax. Both are first introduced in korn shell (ksh) and adopted in bash. -- Allen Brown [EMAIL PROTECTED] http://www.peak.org/

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Rob Hudson
Thanks for the description. This helped, and also I found an IBM article that explains the chopping stuff too: http://www-128.ibm.com/developerworks/linux/library/l-bash.html Thanks all, Rob Allen Brown wrote: Rob Hudson wrote: Looks like I can do: path = `dirname $path` # for directory pat

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread T. Joseph CARTER
Allen, $() is not part of bourne shell, just for the record. -- "We are what we repeatedly do. Excellence, therefore, is not an act, but a habit." -- Aristotle ___ EUGLUG mailing list euglug@euglug.org http://www.euglug.org/mailman/listinfo/eug

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Russ Johnson
Rob Hudson wrote: Given a variable with something like this in it: /Volumes/Projects/Testing/Simple_Carbon_App.pkg I need to extract the base path to get: /Volumes/Projects/Testing basename will give you the name of the file, and dirname will give you the path: $ basename /Volumes/Project

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Allen Brown
Rob Hudson wrote: Looks like I can do: path = `dirname $path` # for directory path = `basename $path` # similar to path=${path##/*/} Is this the best option? That is a good option. It provides backward compatibility with the boring shell (Bourne). However I prefer the $() syntax since it pr

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Fred James
Rob Hudson wrote: Given a variable with something like this in it: /Volumes/Projects/Testing/Simple_Carbon_App.pkg I need to extract the base path to get: /Volumes/Projects/Testing I found how to get the last part in an example, though I don't fully understand what's going on. Assuming "path

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Mike Cherba
Well, I'm not a bash expert, but personally I would use the following: path=`dirname $path` you might want to pull the man pages for "dirname" and "basename" which are on most systems I've ever used and should do what you want with less headache. My quick test of my memory follows: [EMAIL

Re: [Eug-lug] calling all bash experts...

2005-12-08 Thread Rob Hudson
Looks like I can do: path = `dirname $path` # for directory path = `basename $path` # similar to path=${path##/*/} Is this the best option? Rob Hudson wrote: Given a variable with something like this in it: /Volumes/Projects/Testing/Simple_Carbon_App.pkg I need to extract the base path to get

[Eug-lug] calling all bash experts...

2005-12-08 Thread Rob Hudson
Given a variable with something like this in it: /Volumes/Projects/Testing/Simple_Carbon_App.pkg I need to extract the base path to get: /Volumes/Projects/Testing I found how to get the last part in an example, though I don't fully understand what's going on. Assuming "path" has the first volu

Re: [Eug-lug] SAO Tech Brew Pub tonight

2005-12-08 Thread Mike Cherba
Just to clarify things before the questions get posted. Because of SAO tonight, EUGLUG will not have any official clinic. There will however, be an informal gathering for dinner of Euglugers (and anyone from SAO we can talk into joinging us) following the SAO meeting. If anyone has questions, pl

[Eug-lug] SAO Tech Brew Pub tonight

2005-12-08 Thread Matthew Jarvis
Apparently the reminder didn't go out as planned SAO thing tonight at the Rogue, 5:30-7:30. Intechgra doing presentation on their remote monitoring and Admin services. Bring your resumes Matthew S. Jarvis IT Manager Bike Friday - "Performance that Packs." www.bikefriday.com 541/687-04