Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: NULLCMD



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



Messages sorted by: Reverse Date, Date, Thread, Author