- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Dam script will not work - ;^0
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 11:40 AM
тАО09-05-2001 11:40 AM
Re: Dam script will not work - ;^0
make more money
Make: Don't know how to make more. Stop.
Oops. Looks like we're out of luck! ;)
JP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 11:46 AM
тАО09-05-2001 11:46 AM
Re: Dam script will not work - ;^0
I wish you could get this script to work, though I'd rather be 25. Auto Insurance is cheaper that way. ;)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:01 PM
тАО09-05-2001 12:01 PM
Re: Dam script will not work - ;^0
I see a problem where you are using comparison operatos. In Shell there two types of comparison operatos one for numberics and other for strings.
If you are comparing strings use ==, !=, > , < etc.,
If you are comparing numerics use -gt,-ne,-lt,-eq etc.
The script is modified to work.
Thanks,
Madhu
--------
#/bin there done that
##########################################
# One for us :- ;^) PJFC Sep 2001
##########################################
# The next bit
# Age
a=`cat /usr/sysadmin | awk ?{print $1}?`
if test $a ?eq 21
then a=21
fi
##########################################
# Sex
b= `cat /usr/sysadmin | awk ?{print $2}?
if test ?$b? != ?A lot?
then b=?Sex god?
fi
##########################################
# Income
c= `cat /usr/sysadmin | awk ?{print $3}?`
if test ?$c? != ?Not Enough?
then b= ?current x 3?
fi
--------------Cut here-------------------
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:08 PM
тАО09-05-2001 12:08 PM
Re: Dam script will not work - ;^0
The errors are:-
age = "You must be joking"
sex = "You are already at limit"
income = "Export cv/resume"
;^0
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:10 PM
тАО09-05-2001 12:10 PM
Re: Dam script will not work - ;^0
This one would be good enough for me...
#/usr/bin/beer #(the little known beer shell)
#####################################
# Beer
beer=0
drinking=TRUE
while [ drinking = TRUE ]
do
if [ beer -ne 24 ]
then
((beer+=1))
else
sleep 3600
beer=0
done
Cheers!
-Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:13 PM
тАО09-05-2001 12:13 PM
Re: Dam script will not work - ;^0
Your script has the following statment
c= ?current x 3?
Here the variable current doesn't have any value neither initialised nor assigned.
Are you trying to multiply current x 3 or are you trying to assign a string "current x 3" ?
...Madhu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:13 PM
тАО09-05-2001 12:13 PM
Re: Dam script will not work - ;^0
You could perhaps use a get and make in your script.
i.e.
if beer = 0
then get more beer
fi
or
if beer =0
then make beer
fi
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:16 PM
тАО09-05-2001 12:16 PM
Re: Dam script will not work - ;^0
sleep 31536000
and that should fix it for now.
Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:16 PM
тАО09-05-2001 12:16 PM
Re: Dam script will not work - ;^0
Yes I spotted that and defined current as 1 in the script.
;-)
Paula
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-05-2001 12:17 PM
тАО09-05-2001 12:17 PM
Re: Dam script will not work - ;^0
beer | user | bathroom
Of course, there is always my favorite little script (courtesy of thinkgeek.com - they have it on a t-shirt that I'd love to have!)
cd /pub
more beer
JP