Ran 'copy' command as below within an eshell inside NTEmacs 21.3, but
get the
above error. But why?
c:/devkits/cygwin/home/xxx/elisp $ copy setnu.elc setnu.edd
copy: command not found
c:/devkits/cygwin/home/xxx/elisp $ which cp
eshell/cp is a compiled Lisp function in `em-unix'
c:/devkits/cygwin/home/xxxp/elisp $ which ls
eshell/ls is a compiled Lisp function in `em-ls'
c:/devkits/cygwin/home/xxx/elisp $ which copy
which: no copy in
(C:\WINNT\system32;C:\WINNT;C:\WINNT\system32\WBEM;c:\devkits\emacs-20.7\bin;c:\devkits\cscope\bin;c:\devkits\cygwin\usr\local\bin;c:\devkits\cygwin\bin)
c:/devkits/cygwin/home/xxxx/elisp $
Any ideas?
|
|
0
|
|
|
|
Reply
|
podi.kuruppu (12)
|
3/19/2005 2:48:33 AM |
|
Hi slguy,
"slguy" writes:
> Ran 'copy' command as below within an eshell inside NTEmacs 21.3,
> but get the above error. But why?
What makes you expect such a command?
If you are thinking about the COPY command that you can use in
CMD.EXE/COMMAND.COM, that is an *internal* command of those shells,
just like DIR and some others. So it's not on the path, eshell can't
find it and won't know about it.
I don't know eshell, but if you really need this, you can probably
make some kind of alias that maps "copy" to "CMD.EXE /C COPY".
benny
|
|
0
|
|
|
|
Reply
|
Benjamin
|
3/19/2005 3:24:53 PM
|
|
Actually, I *would* expect it to work because this is NT Emacs so any
and all native Windows commands should naturally be available from
within emacs, if not within
eshell. It is just that eshell appears to be better than a DOS shell
and I was hoping
to migrate my work over to an eshell environment.
I just found that it works fine from within a shell started with 'M-x
shell' command, so I'm sure I'm missing something here.
|
|
0
|
|
|
|
Reply
|
slguy
|
3/19/2005 5:33:39 PM
|
|
slguy wrote:
> Actually, I *would* expect it to work because this is NT Emacs so any
> and all native Windows commands should naturally be available from
> within emacs, if not within
> eshell. It is just that eshell appears to be better than a DOS shell
> and I was hoping
> to migrate my work over to an eshell environment.
>
> I just found that it works fine from within a shell started with 'M-x
> shell' command, so I'm sure I'm missing something here.
Nope, Windows just doesn't work that way.
Eshell tries to be as close to a Unix Bash shell as possible. That
means that all non-built in commands are expected to be programs that
can be executed. COPY is not a program (there is no COPY.EXE in
Windows), so Eshell can't find it.
Eshell implements many of the most commonly used Unix programs (ls, cp,
mv) in Lisp as built ins. For copying a file you can use cp like this:
usage: cp [OPTION]... SOURCE DEST
or: cp [OPTION]... SOURCE... DIRECTORY
-- MJF
|
|
0
|
|
|
|
Reply
|
M
|
3/19/2005 7:45:29 PM
|
|
M Jared Finder <jared@hpalace.com> writes:
> Eshell implements many of the most commonly used Unix programs (ls,
> cp, mv) in Lisp as built ins. For copying a file you can use cp like
> this:
>
> usage: cp [OPTION]... SOURCE DEST
> or: cp [OPTION]... SOURCE... DIRECTORY
Sure, but the 'copy' command is really buried inside a huge Makefile
we use (and share)) to build software and I'm not at liberty to change
it because others will not compile code necessarily within NTEmacs.
But, I do note your point.
|
|
0
|
|
|
|
Reply
|
Podibanda
|
3/19/2005 8:09:52 PM
|
|
Podibanda Kuruppu wrote:
> M Jared Finder <jared@hpalace.com> writes:
>
>>Eshell implements many of the most commonly used Unix programs (ls,
>>cp, mv) in Lisp as built ins. For copying a file you can use cp like
>>this:
>>
>>usage: cp [OPTION]... SOURCE DEST
>> or: cp [OPTION]... SOURCE... DIRECTORY
>
>
> Sure, but the 'copy' command is really buried inside a huge Makefile
> we use (and share)) to build software and I'm not at liberty to change
> it because others will not compile code necessarily within NTEmacs.
>
> But, I do note your point.
Well, there's two solutions I can think of off hand to get around that.
1. As long as copy takes the same parameters in the same order as cp,
just alias copy to cp in Eshell: alias copy='cp'
2. Write your own COPY.EXE, using CMD.EXE to execute it. This should be
easy to write in C using GetCommandLine() and system().
-- MJF
|
|
0
|
|
|
|
Reply
|
M
|
3/19/2005 10:22:35 PM
|
|
|
5 Replies
356 Views
(page loaded in 0.072 seconds)
Similiar Articles: Why does `source .bashrc` complain "command not found"? - comp ...Why does `source .bashrc` complain "command not found"? - Ruby Forum Is it just me or is this something that just cant be done? Ive found out that whenever system calls ... SAY command on z/OS - Routine not found - comp.lang.rexx ...I am creating a very simple REXX exec on z/OS and receiving Routine not found for the SAY command. I have never had this happen before, but this is m... While loop in tcsh - comp.unix.shell... post questions in newsgroups, not directly to me *** *** PLEASE don't copy me ... end > > However I am getting the following error : > cnt=4: command not found (Error is ... fastest way to copy a disk - comp.unix.solarisIn this case, what is the proper command ? Do I have to ... The syntax etc can be found at http://adminschoice ... I think I've done this kind of copy, but not as often as I've ... cisco vpn client error - windows xp asking for cscogina.dll on ...Then copy the msgina.dll file in theWinNT\System32 directory (Windows 2000) orWindows\System32 directory (Windows XP) over to a file named cscogina.dll. The copy command ... Volume not found - comp.unix.solarisWhy can I see these disks with the probe-scsi-all command but not see them with the format command? ... Volume not found - comp.unix.solaris Why can I see these ... SUMMARY ... run following shell error on solaris but OK on RedHat, why ...... the [...] by test because otherwise it says: bash: [1: command not found Wich ... run following shell error on solaris but OK on RedHat, why ... running a bash command with ... Copying printers definition from a host to new - comp.unix.solaris ...... misery was gone, there were no arcane commands or ... 200 printers to crete... it's not so nice do it by hand. I prefer to copy it ... If you don't, then why not spend the ... No tftpdnld command - comp.dcom.sys.ciscoRouter#copy tftp: flash: Address or name of remote host [10.1.1.2 ... mz.124-11.XW7.bin > >>>>> rommon 12 > tftpdnld -r > >>>>> monitor: command "tftpdnld" not found ... format command not work - comp.unix.solarisVolume not found - comp.unix.solaris Volume is not in dump format --- what format is it? - comp.unix ... format command not work - comp.unix.solaris Volume not found ... MS-DOS copy command helpMicrosoft DOS copy command. Quick links. About copy Availability Syntax Examples ... Copy the autoexec.bat, usually found at root, and copy it into the windows directory; the ... Linux / UNIX: Command not found error and how do I get rid of it?Why am I getting a 'command not found' error when executing Linux or UNIX commands? ... After I set it to UNIX and uploaded the latest copy, the program executed ... 7/25/2012 2:10:12 AM
|