On Fri, Apr 02, 2010 at 08:35:24PM -0700, Thomas Taylor wrote: > > #...@#@ this is where I'm having problem > Selection=echo "$selection" | tr -d '/'
No wonder! That syntax assigns the word echo to the variable Selection in the process that will be started to execute the contents of $selection, which refer to a non-existent file in the root directory. As the other guy said, you need back-quotes or the $() syntax to do what you want, which is called "command substitution". Perhaps you'd like to attend the Shell Programming class I'm teaching from 6/28 to 6/30 here in Seattle, which covers these kinds of topics! 8-} -Tim *----------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX http://www.consultix-inc.com | | tim at ( TeachMePerl, TeachMeLinux, or TeachMeUnix ) dot Com | | CLASSES> Perl Database: 4/26; Basic Perl: 5/3; Perl Modules: 5/6 | *-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- | > "Minimal Perl for UNIX People" has been an Amazon Best Seller! < | | * Download chapters, read reviews, and order at: MinimalPerl.com * | *----------------------------------------------------------------------*
