- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script for adding
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
Forums
Discussions
Discussions
Discussions
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
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
03-03-2005 04:47 PM
03-03-2005 04:47 PM
I have tried out this in my shell script, doesnt seem to be correct though.. any suggestion?
while(TRUE)
y=0
x=`awk '{ print $5 }' $BUF`
let y=y+x
done
it gave an error "y=y+: more tokens expected"
May I know how this can be corrected?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2005 05:02 PM
03-03-2005 05:02 PM
Re: Script for adding
y=0
x=`awk '{ print $5 }' $BUF`
y=y+x
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2005 05:13 PM
03-03-2005 05:13 PM
Re: Script for adding
y=0
while(TRUE)
x=`awk '{ print $5 }' $BUF`
y=y+x
done
using the script..
when i echo "$y" i got "y+88" ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2005 05:25 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2005 05:38 PM
03-03-2005 05:38 PM
Re: Script for adding
Here an idea :
export NC0="0"
export NC1="0"
export NC2="0"
export NC3="0"
NC0=`expr $NC0 + 1`
#
#
if [ "$F1" = "72" ]
then
NC1=`expr $NC1 + 1`
elif
[ "$F1" = "76" ]
then
NC2=`expr $NC2 + 1`
elif
[ "$F1" = "78" ]
then
NC3=`expr $NC3 + 1`
fi
#
Rgds
Alexander M. Ermes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2005 05:55 PM
03-03-2005 05:55 PM
Re: Script for adding
I used Tripathy suggestion, but I have to initialise as well..
integer x=0
integer y=0
while(TRUE)
x=`awk '{ print $5 }' $BUF`
y=$y+$x
done
It work fine!!
ThankS !!!!