Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Copy newest file to newest directory
- X-seq: zsh-users 11071
- From: zzapper <david@xxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Copy newest file to newest directory
- Date: Fri, 8 Dec 2006 14:10:55 +0000 (UTC)
- Cc: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: SuccessTheory
- References: <Xns98937B980EE3Ezzappergmailcom@xxxxxxxxxxx> <20061208122238.GA17120@xxxxxxxxxxxxxxx> <Xns98938890B9A97zzappergmailcom@xxxxxxxxxxx> <20061208134715.GC17120@xxxxxxxxxxxxxxx>
- Sender: news <news@xxxxxxxxxxxxx>
Frank Terbeck <ft@xxxxxxxxxxxxxxxxxx> wrote in
news:20061208134715.GC17120@xxxxxxxxxxxxxxx:
Frank
Thanks I've just added an echo
function cpn()
{
setopt localoptions
setopt globassign
local nf nd
[[ -z ${1} || -z ${2} ]] && printf 'usage: cpn <fromdir> <todir>\n' &&
return 1
nf=${1}/*(.om[1]N)
nd=${2}/*(/om[1]N)
result="cp $nf $nd"
[[ -n ${nd} && -n ${nf} ]] && command cp ${nf} ${nd} ; echo $result
}
--
zzapper
http://successtheory.com/tips/ Vim, Zsh, MySQL Tips
Messages sorted by:
Reverse Date,
Date,
Thread,
Author