- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- script to display the grep command to the screen
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
04-02-2005 08:25 PM
04-02-2005 08:25 PM
script to display the grep command to the screen
I am new to the script this is the 1st time i just wanted to know the how much user login to the particular server and I issued the following command to know:
#ps -ef | grep DEAL* |wc -l
I want the command execute every after to minute to the current screen and display login user connection.
Gentlemen please help me.
Thanks,
Mohammed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2005 08:46 PM
04-02-2005 08:46 PM
Re: script to display the grep command to the screen
below simple script
#!/bin/sh
while true
do
clear
echo "Number of logged users = `who | wc -l`"
sleep 60
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2005 08:53 PM
04-02-2005 08:53 PM
Re: script to display the grep command to the screen
where shall i execute this script, I mean the #ps -ef |grep DEAL* |wc -l:
whre DEAL is a sever whre users logging in.
how do i automate to display on the screen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2005 09:08 PM
04-02-2005 09:08 PM
Re: script to display the grep command to the screen
you can execute such script on terminal you are logged to system and output will be displayed on this terminal window.
while true
do
clear
ps -ef |grep DEAL* |wc -l
sleep 60
done
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2005 09:10 PM
04-02-2005 09:10 PM
Re: script to display the grep command to the screen
it is ok i manager to execute with the following way:
#!/bin/sh
while true
do
clear
echo "Number of logged user = `ps -ef |grep DEAL* |wc -l`"
sleep 60
done
But after that cursor only blink doesn't give the out put after 2 minutes.
I also would like to add the current time before "Number of logged user "with the output.
thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2005 11:01 PM
04-02-2005 11:01 PM
Re: script to display the grep command to the screen
I have doubt, If you want find out current no of users, displaying `who` is best option.
regds
TT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-03-2005 01:23 AM
04-03-2005 01:23 AM
Re: script to display the grep command to the screen
Acctully i m trying to locate the application user this user using the application and accessing the componet called DEAL server. now it works fine.
thank you,
imran