AW: Problem with basename

2001-02-16 Thread klaus . berndl
> > I've just run your script and it worked with both forms. I > would suspect > something is wrong with your command (may be you have tab instead of > space ? within the 2 basename ?). Run diff on the scripts and > check it. No, i have definitly no tabs in my script! > > Earnie, Your com

Re: Problem with basename

2001-02-16 Thread Earnie Boyd
Ehud Karni wrote: > > Earnie, Your comment on the "file" variable name is good programming > hint in general, but it sure is not the problem here. > Sorry, I did mean to imply that that was the problem. It was merely a suggestion of style. Thanks for the clarification. Earnie.

Re: Problem with basename

2001-02-16 Thread Ehud Karni
On Fri, 16 Feb 2001 09:31:22 -0500, Earnie Boyd <[EMAIL PROTECTED]> wrote: > > [EMAIL PROTECTED] wrote: > > > > i have written the following function: > > > > function check-el-compile () > > { > > for file in $*; do > > elcfile=`basename $file .el`.elc > >

Re: Problem with basename

2001-02-16 Thread Mumit Khan
On Fri, 16 Feb 2001 [EMAIL PROTECTED] wrote: > But if i write the functon like follows: > > function check-el-compile () > { > for file in `ls *.el`; do > # same as above. > > then the basename call doesn´t work, i.e. it always returns $file. > It seems that the output

AW: Problem with basename

2001-02-16 Thread klaus . berndl
No, i don´t have any special characters in the filenames. And renaming $file in $F doesn´t help too. Hmm, very mysterious! Thanks, Klaus > > [EMAIL PROTECTED] wrote: > > > > i have written the following function: > > > > function check-el-compile () > > { > > for file in $*;

Re: Problem with basename

2001-02-16 Thread Earnie Boyd
[EMAIL PROTECTED] wrote: > > i have written the following function: > > function check-el-compile () > { > for file in $*; do > elcfile=`basename $file .el`.elc > if [ ! -f "$elcfile" ]; then > missinglist="$missinglist $file" >

Problem with basename

2001-02-16 Thread klaus . berndl
i have written the following function: function check-el-compile () { for file in $*; do elcfile=`basename $file .el`.elc if [ ! -f "$elcfile" ]; then missinglist="$missinglist $file" fi done echo "Not compiled Fi