zsh-users
 help / color / mirror / code / Atom feed
From: Eric Smith - Fruitcom <Eric.Smith@fruitcom.com>
To: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: defining real time variables for a shell
Date: Sun, 20 Mar 2005 21:09:00 +0100	[thread overview]
Message-ID: <20050320200900.GD26316@fruitcom.com> (raw)
In-Reply-To: <050320115822.ZM9627@candle.brasslantern.com>

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


  parent reply	other threads:[~2005-03-20 20:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-20 17:05 Eric Smith
2005-03-20 18:29 ` Bart Schaefer
     [not found]   ` <20050320190854.GC26316@fruitcom.com>
     [not found]     ` <050320115822.ZM9627@candle.brasslantern.com>
2005-03-20 20:09       ` Eric Smith - Fruitcom [this message]
2005-03-20 22:04         ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050320200900.GD26316@fruitcom.com \
    --to=eric.smith@fruitcom.com \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).