Sponsored Content
Full Discussion: Removing Inactive Sessions
Top Forums Shell Programming and Scripting Removing Inactive Sessions Post 302505170 by Corona688 on Wednesday 16th of March 2011 11:40:54 AM
Old 03-16-2011
Assuming the users have no spaces, this could do:

Code:
[ ! -z "$my" ] && for U in $my
do
        /u/ud/bin/deleteuser $U >/dev/null 2>&1
done

There is a limit on the maximum number of arguments sh can fit in an argument list like that, but unless you have hundreds and hundreds of logins to kill I think the limit should be sufficient.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to logout inactive users????

I would like to automatically logout from the system inactive users depending on their functions. For example there are users that I would like to logout after 15 minutes of inactivity, but there are others that I would like to logout after 30 minutes of inactivity. It's possible to do this??? (6 Replies)
Discussion started by: rrivas
6 Replies

2. Programming

wired and inactive pages

Hello How to find out wired pages and inactive pages in HP -UNIX. Bye (1 Reply)
Discussion started by: manjunath
1 Replies

3. UNIX for Advanced & Expert Users

inactive pages

hi, plz tell me, how can get the inactive pages in HP UX. bye.... (1 Reply)
Discussion started by: venkat_t
1 Replies

4. UNIX for Dummies Questions & Answers

Inactive Session

Hi, I am new to forum, I am wondering anyone can help me ? Is there a command to tell whether a particular process is already inactive, so I can issue a kill command to end it. I have been encountering scenerio whereby users always shutdown abnormally by closing the windows, and my application... (12 Replies)
Discussion started by: lowtaiwah
12 Replies

5. Shell Programming and Scripting

Getting error while getting status of active and inactive sessions from ORACLE DB

Hi All, I have a written a test script which retrieves the status of active and inactive sessions from oracle DB, but i am receiving error while executing. My script is filepath="/home/ocsg/scripts/db_session_report/current_session_report.txt"... (1 Reply)
Discussion started by: poweroflinux
1 Replies

6. UNIX for Advanced & Expert Users

Find Inactive VG

lsvg -o shows active VGs. Is there a way to find inactive VGs with a command? Please advise. (2 Replies)
Discussion started by: Daniel Gate
2 Replies

7. UNIX for Advanced & Expert Users

Help in Oracle Inactive Sessions

hi , i could see 50-60 oracle inactive session running under my application name, does this cause any issue.. or can this inactive session be excluded , if so how can we reduce them or exclude them , your inputs are much required. my application runs on C++ with oracle , pro*c involved.... (1 Reply)
Discussion started by: senkerth
1 Replies
delta(1)						      General Commands Manual							  delta(1)

Name
       delta - create new SCCS delta to save changes

Syntax
       delta [-rSID] [-s] [-n] [-glist] [-m[mrlist]] [-y[comment]] [-p] files

Description
       The  command  is used to permanently introduce into the named SCCS file changes that were made to the file retrieved by (called the g-file,
       or generated file).

       The command makes a delta to each named SCCS file.  If a directory is named, behaves as though each file in the directory were specified as
       a  named  file,	except	that  non-SCCS	files  (last component of the path name does not begin with s.)  and unreadable files are silently
       ignored.  If a name of - is given, the standard input is read (see RESTRICTIONS); each line of the standard input is taken to be  the  name
       of an SCCS file to be processed.

       The  command may issue prompts on the standard output depending upon certain keyletters specified and flags that may be present in the SCCS
       file.  For further information, see -m and -y keyletters below and

       The includes commentary, input by the user, that consists of one or more lines, terminated by a period (.) in column one of a new line.

       Keyletter arguments apply independently to each named file.

Options
       Keyletter arguments:

       -glist		   Ignores specified list of deltas.

       -m[mrlist]	   Indicates the modification request number.  (-m[mrlist]).

			   If -m is not used and the standard input is a terminal, the prompt MRs?  is issued on the standard  output  before  the
			   standard input is read; if the standard input is not a terminal, no prompt is issued.  The MRs?  prompt always precedes
			   the comments?  prompt (see -y keyletter).

			   MRs in a list are separated by blanks and/or tab characters.  An unescaped new-line character terminates the MR list.

			   Note that if the v flag has a value it is taken to be the name of a program (or shell procedure)  which  will  validate
			   the	correctness  of the MR numbers.  For further information, see If a non-zero exit status is returned from MR number
			   validation program, terminates (it is assumed that the MR numbers were not all valid).

       -n		   Does not delete edited file.

       -p		   Displays differences before and after delta is applied.

       -rSID		   Identifies which delta is to be made to the SCCS file.  Use this keyletter only if two or  more  outstanding  gets  for
			   editing (get -e) on the same SCCS file has been done by the same person (login name).  The SID value specified with the
			   -r keyletter can be either the SID specified on the command line or the SID to be made as reported by the command.  For
			   further  information,  see  A diagnostic results if the specified SID is ambiguous, or, if necessary and omitted on the
			   command line.

       -s		   Suppresses all messages.

       -y[comment]	   Creates delta with specified commentary.  text A null string is considered a valid comment.
			   If -y is not specified and the standard input is a terminal, the prompt comments?  is issued  on  the  standard  output
			   before  the standard input is read; if the standard input is not a terminal, no prompt is issued.  A period (.) in col-
			   umn one of a newline terminates the comment text.

Restrictions
       Lines beginning with an SOH ASCII character (binary 001) cannot be placed in the SCCS file unless the SOH is escaped.  This  character  has
       special meaning to SCCS and will cause an error.  For further information, see

       A  of  many  SCCS  files,  followed  by	a  of those files, should be avoided when the generates a large amount of data.  Instead, multiple
       sequences should be used.

       If the standard input (-) is specified on the command line, the -m (if necessary) and -y keyletters must  also  be  present.   Omission	of
       these keyletters causes an error to occur.

Diagnostics
       See for explanations.

Files
       g-file		   Existed before the execution of removed after completion of

       p-file		   Existed before the execution of delta; may exist after completion of

       q-file		   Created during the execution of removed after completion of

       x-file		   Created during the execution of renamed to SCCS file after completion of

       z-file		   Created during the execution of removed during the execution of

       d-file		   Created during the execution of removed after completion of

       /usr/bin/bdiff	   Program to compute differences between the ``gotten'' file and the g-file.

See Also
       admin(1), bdiff(1), cdc(1), get(1), help(1), prs(1), rmdel(1), sccs(1), sccsfile(5)
       Guide to the Source Code Control System

																	  delta(1)
All times are GMT -4. The time now is 07:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy