bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cp --target-dir=dir + shell expansion?


From: Chris Green
Subject: Re: cp --target-dir=dir + shell expansion?
Date: Tue, 09 Dec 2003 22:06:48 -0500
User-agent: Gnus/5.1003 (Gnus v5.10.3) XEmacs/21.4 (Reasonable Discussion, linux)

address@hidden (Bob Proulx) writes:

> Chris Green wrote:
>> find . -name sregex.el -o -name rx.el | xargs cp --target-directory=~/elisp
>> cp: `~/elisp': specified target is not a directory
>
> Usually the shell expands ~ characters.  But in this case it can't
> because it is not a leading ~ but packed in the middle of a string.
>

Yeah, it just took about 3 minutes for me and I've been doing
scripting for about 5 years.

[ thanks for history of where ~ came from ]

I couldn't think of a good solution for this, I just thought I'd
enumerate all the obvious ones if there was an acceptable one, let
someone pick.

> Try using $HOME instead.  That should work normally.

Yeah, I used to see that a good bit.  I always wondered why crontab(5)
used $HOME when someone could type a whole lot less.
-- 
Chris Green <address@hidden>
A watched process never cores.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]