zsh-users
 help / color / mirror / code / Atom feed
* NULLCMD
@ 1997-07-11  4:45 Timothy Luoma
  1997-07-11  7:27 ` NULLCMD Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Timothy Luoma @ 1997-07-11  4:45 UTC (permalink / raw)
  To: zsh-users


I don't seem to understand the NULLCMD function.

Say I have a lot of files I want to move to

/Some/Dir/Somewhere

and I want to drag them to the window and drop them and hit return (after  
each one) so that I might drop a file and the path would be

/path/to/real/file.txt

is there a way to use the NULLCMD feature so that if I drop a pathname it  
will know that I want to move that file to /Some/Dir/Somewhere?

right now I just get:

zsh: permission denied /path/to/real/file.txt

thanks
TjL


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NULLCMD
  1997-07-11  4:45 NULLCMD Timothy Luoma
@ 1997-07-11  7:27 ` Bart Schaefer
  1997-07-11  8:00   ` NULLCMD Hrvoje Niksic
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 1997-07-11  7:27 UTC (permalink / raw)
  To: luomat, zsh-users

On Jul 11, 12:45am, Timothy Luoma wrote:
} Subject: NULLCMD
}
} I don't seem to understand the NULLCMD function.

It's what gets executed when you redirect output from nowhere, e.g.

zsh% > /some/file

is equivalent to

zsh% $NULLCMD > /some/file

Conversely, READNULLCMD is what gets executed when you redirect input to
nowhere; e.g.

zsh% < /some/file

is equivalent to

zsh% $READNULLCMD < /some/file

Here's a way to fill your disk with foo:

zsh% echo foo > foo
zsh% >>foo <foo

} is there a way to use the NULLCMD feature so that if I drop a pathname it  
} will know that I want to move that file to /Some/Dir/Somewhere?

No.

You'd have to start a loop like this:

zsh% while read name; do mv $name /Some/Dir/Somewhere; done

Then you drag, drop, and hit return, until you've moved all the files;
and when done, you type ctrl-D to terminate the loop.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NULLCMD
  1997-07-11  7:27 ` NULLCMD Bart Schaefer
@ 1997-07-11  8:00   ` Hrvoje Niksic
  1997-07-11  9:21     ` NULLCMD Geoff Wing
  0 siblings, 1 reply; 4+ messages in thread
From: Hrvoje Niksic @ 1997-07-11  8:00 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: luomat, zsh-users

"Bart Schaefer" <schaefer@candle.brasslantern.com> writes:

> Here's a way to fill your disk with foo:
> 
> zsh% echo foo > foo
> zsh% >>foo <foo

cat: input/output files '-' identical

Shame.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Unspeakable horrors from outer space paralyze the living and
resurrect the dead!


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: NULLCMD
  1997-07-11  8:00   ` NULLCMD Hrvoje Niksic
@ 1997-07-11  9:21     ` Geoff Wing
  0 siblings, 0 replies; 4+ messages in thread
From: Geoff Wing @ 1997-07-11  9:21 UTC (permalink / raw)
  To: zsh-users

Hrvoje Niksic <hniksic@srce.hr> typed:
:"Bart Schaefer" <schaefer@candle.brasslantern.com> writes:
:> Here's a way to fill your disk with foo:
:> zsh% echo foo > foo
:> zsh% >>foo <foo
:cat: input/output files '-' identical
:Shame.

Hmmm, worked for me.  Probably means it's time to fix my OS's cat, since I
can't think of any applications where this is desirable.
-- 
Geoff Wing [mason@primenet.com.au]   Technical Manager
  Phone    : +61-3-9818 2977         PrimeNet - Internet Consultancy
  Facsimile: +61-3-9819 3788         Web : <URL:http://www.primenet.com.au/>
  Mobile   : 0412 162 441


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-07-11  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-07-11  4:45 NULLCMD Timothy Luoma
1997-07-11  7:27 ` NULLCMD Bart Schaefer
1997-07-11  8:00   ` NULLCMD Hrvoje Niksic
1997-07-11  9:21     ` NULLCMD Geoff Wing

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).