- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Script Query
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
08-02-2006 02:37 AM
08-02-2006 02:37 AM
Script Query
Is this if statement enough to fulfill my need, coz lately its been paging me out at 08:00 hrs even though the number of processes are 7 , can somebody let me know why its behaving like this.
Here is the condition that I am putting in :
if [ $gv -lt 7 -a \( $gv2 -eq 16 -o $gv2 -eq 8 \) ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 02:44 AM
08-02-2006 02:44 AM
Re: Script Query
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 02:52 AM
08-02-2006 02:52 AM
Re: Script Query
also ensure you have white spaces around your escaped brackets. You could add a second set of brackets around the internal expression:
if [ \( $gv -lt 7 \) -a \( \( $gv2 -eq 16 \) -o \( $gv2 -eq 8 \) \) ]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 04:20 AM
08-02-2006 04:20 AM
Re: Script Query
if [ \( $gv -lt 7 \) -a \( $gv2 -eq 16 -o $gv2 -eq 8 \) ]
Also after debugging the value picked up by gv and gv2 is correct.
Lets c how its goes tdy and tomm.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 04:24 AM
08-02-2006 04:24 AM
Re: Script Query
if [ $gv -lt 7 -a \( $gv2 -eq 16 -o $gv2 -eq 8 \) ]; then
ps -ef | grep
...
fi
Then consult /tmp/proclist.text the next time you are paged to see exactly was was running at the time.
PCS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-02-2006 04:26 AM
08-02-2006 04:26 AM
Re: Script Query
-a and -o are for checking on filetypes.
in ksh the following works fine:
if [[ $gv -lt 7 && ($gv2 -eq 16 || $gv2 -eq 8) ]]
then
page hunki
fi
or you could always use perl or awk and not have to bother about [ or [[ or ( or (( or \(