On Wed, Jan 7, 2009 at 9:23 PM, Jean-Pierre Thibert
<jpthibert at eircom.net> wrote:
> Hi everybody and happy new year,
>> I'm learning shell script and have some questions. Could you help me?
>> 1)I have a variable with a value between 00.00 to 100.00 (ie : 12.58)
> I want to extract the integer. Something like X=int(MYVAR)
> How to do that? I didn't find out after a lot of research.
echo "12.34" | cut -d . -f 1
> 2) I think wget command has an output only as a file not a variable.
> Am I right?
asd=`wget -q -O - http://checkip.dyndns.org/`
<html><head><title>Current IP Check</title></head><body>Current IP
>> 3) I tried to find a script commands reference on Internet and a detailed
> training unsuccessfully.
> Have you some good links?
bash scritpting/programing howtos, don't remember any really good one,
but probably there are some
man bash (no kidding)
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!