Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: defining real time variables for a shell
- X-seq: zsh-users 8614
- From: Eric Smith - Fruitcom <Eric.Smith@xxxxxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxxxxx>
- Subject: Re: defining real time variables for a shell
- Date: Sun, 20 Mar 2005 21:09:00 +0100
- In-reply-to: <050320115822.ZM9627@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050320170559.GA30366@xxxxxxxxxxxx> <050320102936.ZM9380@xxxxxxxxxxxxxxxxxxxxxxx> <20050320190854.GC26316@xxxxxxxxxxxx> <050320115822.ZM9627@xxxxxxxxxxxxxxxxxxxxxxx>
Thanks Bart.
According to Bart Schaefer on Sun, Mar 20, 2005 at 11:58:22AM -0800:
} On Mar 20, 8:08pm, Eric Smith - Fruitcom wrote:
} > Subject: Re: defining real time variables for a shell
} > Thanks Bart
}
} (Did you intentionally send this only to me, and not to the list? No big
} deal, I just wondered.)
Sorry, just carelessness.
} > I would like to have the forex rates in vars in order to do
} > my arithmatic on the command line.
}
} Ah, OK. In that case I think a sched command is indeed the way to go.
}
} > This rule in my prexec() make it easy for me to do math fast:
} > elif [[ $cmd[1] == [\(\)0-9]* ]]; then
} > application=calc
} > ( I think you wrote that one for me :) )
Yeah, when I have a moment, I will write how I apply this command line
"mailcap" to most things I do. For example entering a pdf file on one machine will
launch a pdf viewer while doing the same thing on my remote server will
submit that pdf to hylafax (which sends it to the fax numbers in the
header section of the pdf).
} Sort of; in fact, I just made reference to that thread in a zsh-workers
} posting a few minutes ago.
}
} > so I might do something like:
} >
} > '(15/$GBP)+(3750/1900)'
} > .... ooops - I see it is more complicated than i thought
} > to have all your cake and eat it all :)
}
} Just get rid of the $ sign -- it's not necessary in math context unless
} you're referring to something like the length of a string with $#scalar
} or the number of arguments $# or a positional parameter like $3.
}
} '(15/GBP)+(3750/1900)'
Huh? the GBP is a var, how can a bare string be interpolated.
[eric@pepper ~] $ "(15/GBP)+(3750/1900)"
"GBP" is undefined
Messages sorted by:
Reverse Date,
Date,
Thread,
Author