Linux / UNIX Tech Support Forum
This is a discussion on looking for a unix command for hpux - watch within the HP-UX forums, part of the UNIX operating systems category; watch is a common linux command that executes a program periodically, showing output fullscreen. I couldn't find anything for hpux, ...
|
|||||||
|
|||
|
watch is a common linux command that executes a program periodically, showing output fullscreen.
I couldn't find anything for hpux, so I created the following shell which the user is testing: cat /usr/bin/watch Code:
#!/bin/sh while [ 1 ] ; do clear echo "Command: $*" date echo "" ( $* ) sleep 10 done thanks and hh, manny Last edited by nixcraft; 22-12-2009 at 11:38 PM. |
| Sponsored Links | ||
|
|
|
||||
|
watch is GNU utility and is part of procps package. You can download source from the Internet and see if you can compile it locally.
procps - Downloads
__________________
Vivek Gite Linux Evangelist |
|
||||
|
First, you need HPUX compiler and libraries installed. You also need libncurses developer libs. Untar the downloaded tar ball.
cd to new directory and type make Code:
make Code:
make watch Code:
cc -D_GNU_SOURCE -I proc -I/usr/include/ncurses -fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -O2 -s -m64 -Wdeclaration-after-statement -Wpadded -Wstrict-aliasing -fweb -frename-registers -fomit-frame-pointer -fno-inline-functions -c -o watch.o watch.c watch.c: In function ‘main’: watch.c:255: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result cc -fno-common -ffast-math -W -Wall -Wshadow -Wcast-align -Wredundant-decls -Wbad-function-cast -Wcast-qual -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -O2 -s -m64 -Wdeclaration-after-statement -Wpadded -Wstrict-aliasing -fweb -frename-registers -fomit-frame-pointer -fno-inline-functions watch.o -Wl,-warn-common -o watch -lncurses Code:
./watch Code:
Usage: ./watch [-dhntv] [--differences[=cumulative]] [--help] [--interval=<n>] [--no-title] [--version] <command> HTH
__________________
Vivek Gite Linux Evangelist |
|
||||
|
Alternatily, take a look a the following url. It has Open Source Software packages ported to HP-UX. Try searching
Porting And Archive Centre For HP-UX
__________________
Vivek Gite Linux Evangelist |
![]() |
| Tags |
| hpux , hpux watch command , shell scripting |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| unix ls command | raj | Getting started tutorials | 2 | 20-08-2009 03:44 PM |
| unix find out ram usage command | charvi | Solaris/OpenSolaris | 4 | 10-04-2008 02:22 AM |
| HPUX Unix comparing 2 large files line by line | raj | HP-UX | 1 | 11-02-2008 05:20 PM |
| UNIX and Linux command for DNS | chiku | Getting started tutorials | 1 | 29-04-2007 04:36 PM |
| How to watch television on Linux computer | tom | Getting started tutorials | 0 | 08-12-2005 12:46 PM |