Sponsored Content
Top Forums Shell Programming and Scripting Finding The Number Of Programs That A Given User Running On A TERMINAL Post 302118449 by venkata.ganesh on Tuesday 22nd of May 2007 05:35:58 AM
Old 05-22-2007
code please
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

running preinstalled programs

Im using the knoppix version of linux, which is booting straight off the cd, and it shows my c drive (partiton) that has all my programs i have installed in my xp operating system. Im wondering if theres a way i can play my games like lotr return of the king, or jedi academy, in knoppox. it shows... (2 Replies)
Discussion started by: jestra
2 Replies

2. UNIX for Dummies Questions & Answers

installing/running programs.

Hey folks, i'm a total newbie at linux (only installed it yesterday) so don't be mad at me for querying this. I downloaded firefox, and unpacked the library files and binaries into /usr/lib/firefox. Now, am I correct in thinking that to run it, I need to enter the 'sh /usr/lib/firefox' command into... (4 Replies)
Discussion started by: shep
4 Replies

3. UNIX for Advanced & Expert Users

running X-11 programs as root

Hello, I would like to run gedit as root while logged into my regular user account. When I try to launch gedit from the command line as super user, I get this message: Gtk-WARNING **: cannot open display: Any suggestions or word arounds? It would make my life a lot simpler to edit files... (8 Replies)
Discussion started by: Allasso
8 Replies

4. Shell Programming and Scripting

Running programs in perl

I am trying to run a program called GMT using perl. Cannot make to run. I have tried using exec("date"); as a test but when I use exec($try); nothing happens. #!/usr/bin/perl print "$#ARGV\n"; if ($#ARGV != 3) { print "usage: jcdplot.perl\n"; exit; } $h = $ARGV;... (1 Reply)
Discussion started by: kristinu
1 Replies

5. Shell Programming and Scripting

Running programs

I have installed a software called GMT, then writing a script that call the new programs ./example02.sh but I am getting ./example02.sh: line 20: gmtset: command not found I have done ./configure make make install (0 Replies)
Discussion started by: kristinu
0 Replies

6. Programming

Running programs from a Python script

Any idea how I can run a program from a phyton script? For example, in csh I will do $tpath/tsimplex base=$fbase data=$fdata restore=$frestore \ nxp=$nx nzp=$nz param=$param intp=$intp nlay=$nlay \ varp=$varp sigma0=$sigma maxiter=$maxiter tol=$tol \ ... (2 Replies)
Discussion started by: kristinu
2 Replies

7. UNIX for Dummies Questions & Answers

How do you print the number of processes that each user is currently running in Unix?

Ok, so I know there's a way to do this, but I've been trying to find out all afternoon with no luck. I think it should print out something like this: 1 bin 2 daemon 6 duo Where the numbers on the left are the number of processes being run by the user whose name is listed on the right. Is... (4 Replies)
Discussion started by: Duo11
4 Replies

8. UNIX for Advanced & Expert Users

Finding user accounts not accessed for a specific number of days

Hi all, Recently I came across a challenge of finding the user accounts lying around on servers and not being used so much. Our client has hundreds of AIX, RedHat, and Solaris servers. For AIX, I have made a script which uses lsuser and a little bit of sed and awk to show the user accounts... (7 Replies)
Discussion started by: admin_xor
7 Replies

9. Shell Programming and Scripting

Finding which is Running number

Hi All, I have a list of data in the listing file and I run row by row to process the record, but how to identify what is the current process line number ? Thanks. (2 Replies)
Discussion started by: ckwan
2 Replies

10. UNIX for Dummies Questions & Answers

Difference between inbuilt suid programs and user defined root suid programs under bash shell?

Hey guys, Suppose i run passwd via bash shell. It is a suid program, which temporarily runs as root(owner) and modifies the user entries. However, when i write a C file and give 4755 permission and root ownership to the 'a.out' file , it doesn't run as root in bash shell. I verified this by... (2 Replies)
Discussion started by: syncmaster
2 Replies
TERMINFO(3)						   BSD Library Functions Manual 					       TERMINFO(3)

NAME
setupterm, set_curterm, del_curterm, termname, longname, tigetflag, tigetnum, tigetstr, tparm, tputs, putp -- terminal independent operation routines LIBRARY
Terminal Information Library (libterminfo, -lterminfo) SYNOPSIS
#include <term.h> char PC; short ospeed; TERMINAL *cur_term; int setupterm(const char *name, int fildes, int *errret); TERMINAL * set_curterm(TERMINAL *nterm); int del_curterm(TERMINAL *oterm); char * termname(void); char * longname(void); int tigetnum(const char *id); int tigetflag(const char *id); char * tigetstr(const char *id); char * tparm(const char *cm, long p1, long p2, long p3, long p4, long p5, long p6, long p7, long p8, long p9); int tputs(const char *cp, int affcnt, int (*outc)(int)); int putp(const char *cp); int ti_setupterm(TERMINAL **, const char *name, int fildes, int *error); int ti_getflag(const TERMINAL *, const char *id); int ti_getnum(const TERMINAL *, const char *id); const char * ti_getstr(const TERMINAL *, const char *id); char * tiparm(const char *cm, ...); char * ti_tiparm(TERMINAL *, const char *cm, ...); int ti_puts(const TERMINAL *term, const char *str, int affcnt, int (*outc)(int, void *)); int ti_putp(const TERMINAL *term, const char *str); DESCRIPTION
These functions extract and use capabilities from a terminal capability database, usually /usr/share/misc/terminfo, the format of which is described in terminfo(5). These are low level routines; see curses(3) for a higher level package. The setupterm() function extracts the entry for terminal name and then calls set_curterm() to set cur_term to it. If name is NULL then it is replaced by the environment variable TERM. The setupterm() function returns 0 on success and -1 on error. errret is set to -1 if the terminfo database could not be opened, 0 if the terminal could not be found in the database, and 1 if all went well. The set_curterm() function sets the variable cur_term to nterm and makes all of the terminfo boolean, numeric and string variables use the values from nterm. The global variables PC and ospeed are then set. The old value of cur_term is returned. The del_curterm() function frees space pointed to by oterm. The termname() function returns the name of cur_term. The longname() function returns the description of cur_term. The tigetflag() function gets the boolean value of capability id, returning -1 if it is not a valid capability. The tigetnum() function gets the numeric value of the capability id, returning -2 if it is not a valid capability. The tigetstr() function returns the string value of the capability id, returning (char *)-1 if it is not a valid capability. The tparm() function returns a string decoded from cm with the parameters p1 ... p9 applied. Some capabilities require string parameters and only platforms that can fit a char * pointer inside a long can use them. For platforms which don't support this, NULL is returned and errno is set to ENOTSUPP. The string encoding and parameter application is described in terminfo(5). The tputs() function applies padding information to the string cp; affcnt gives the number of lines affected by the operation, or 1 if this is not applicable; outc is a function which is called by each character in turn. The external variable ospeed controls how many padding characters are sent in relation to the terminal speed. The putp() function calls tputs(str, 1, putchar). The output from putp() always goes to stdout. NetBSD Extensions To Terminfo The tiparm() function allows variadic parameters instead of 9 fixed longs. Numeric parameters must be passed as int. String parameters must be passed as char * and works on all platforms, unlike tparm(). The ti_*() functions correspond to the standard t*() functions but take an additional TERMINAL * parameter so that the terminal can be speci- fied instead of assuming cur_term. These functions use private variables to the TERMINAL instead of the global variables, such as PC and ospeed. SEE ALSO
ex(1), curses(3), terminfo(5) AUTHORS
Roy Marples <roy@NetBSD.org> BSD
January 25, 2013 BSD
All times are GMT -4. The time now is 05:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy