Sponsored Content
Full Discussion: Shell command help
Top Forums UNIX for Dummies Questions & Answers Shell command help Post 302457305 by pchelpmtl on Monday 27th of September 2010 05:26:03 PM
Old 09-27-2010
MySQL Shell command help

Hi to you all

I am fairly new to unix and a very green programmer.

Just to avoid some harsh responses as i saw in other posts: THIS ISNOT A QUESTION RELATED TO AN ASSIGNMENT OR CONTRACT" if i wanted to get something done for me, I would use my Rent A Coder or E Lance accounts. I am trying to learn how to do a few scripts in order to better understand server errors for networking.

So here is a question:

How can i determine in UNIX the amount of UNIQUE users logged in at a given time. I searched "Display unique users" and " WHO command options" and consulted man who and who info for details to no avail.

I just want to know how to display the UNIQUE number of users loged on to the shell so that my script will display either the total or unique users loged in.
I already figured out how to display the total ammount of users.

Thanks in advance

Greg
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (0 Replies)
Discussion started by: bosskr
0 Replies

2. HP-UX

How to use more than one MPE command STREAM with Unix command in a single shell?

Hello, I have problem in writing the shell script involving MPE command STREAM related to HP-UX and Unix command. Script is sh "nlshCMD 'STREAM <job name1>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name2>' | 'SHOWJOB' | grep $HPJOBNUM" sh "nlshCMD 'STREAM <job name3>' |... (1 Reply)
Discussion started by: bosskr
1 Replies

3. Shell Programming and Scripting

Need to Write Shell Script based off of this shell command

I'm trying to read a bunch of log files and output the lines that contain particular strings. To accomplish this, I've been running the following from the command line: find . -name "*" | xargs grep " " | grep " " > output.txt Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies

4. Shell Programming and Scripting

can anyone help with shell script command about searching word with grep command?

i want to search in the current directory all the files that contain one word for example "hello" i want to achieve it with the grep command but not with the grep * (2 Replies)
Discussion started by: aintour
2 Replies

5. Shell Programming and Scripting

help with shell script: cp command not working, but mv command works...

Hello. I would like to ask your help regarding the cp command. We are using a cp command to create a back-up copy of our file but to no avail. It's just not working. We already checked the file and directory permissions and all seems correct. We have a script (ftp.script) which calls on... (1 Reply)
Discussion started by: udelalv
1 Replies

6. Shell Programming and Scripting

Any shell or hack that makes the shell command line take vi commands?

basically i'm tired of hitting the left arrow a few dozen times when correcting a mistake or modifying a history command i'd like to use vim style key shortcuts while on the command line so that a 55 moves the cursor 55 places to the left... and i want all the other vi goodies, search of... (3 Replies)
Discussion started by: marqul
3 Replies

7. Shell Programming and Scripting

When i am trying to execute export command within a shell script it is saying command not found.

I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found" My code is as follows: -------------------------- #!/bin/sh user="test" DIR="/bldtmp/"$user VIEW="test.view1" echo "TMPDIR before export... (4 Replies)
Discussion started by: dchoudhury
4 Replies

8. UNIX Desktop Questions & Answers

command to run another shell on top of your default shell?

Can someone point me to the right command to to run another shell on top of your default shell? Thanks PS If admin sees this It is not home work. I am old man who wants to learn unix in my spare time. I CURRENTLY DO NOT GO SCHOOL, COLLEGE OR UNIVERSITY. (2 Replies)
Discussion started by: Bill Thompson
2 Replies

9. UNIX for Dummies Questions & Answers

Which of the following command displays your login shell in bash shell?

Options:: A)$shell B)echo $ bash C)echo $ O D)$ O (1 Reply)
Discussion started by: raghugowda
1 Replies

10. UNIX for Dummies Questions & Answers

Shell script not working but command works in command prompt

Hi everyone I have a problem with my script If I try directly this command /usr/bin/nice -n 19 mysqldump -u root --password="******" wiki_schneider -c | nice -n 19 gzip -9 > /point_de_montage/$(date '+%Y%m%d')-wiki-db.sql.gz It works But if I simply add this command in a script and... (8 Replies)
Discussion started by: picemma
8 Replies
OverrideShell(library call)											       OverrideShell(library call)

NAME
OverrideShell -- The OverrideShell widget class SYNOPSIS
#include <Xm/Xm.h> #include <X11/Shell.h> DESCRIPTION
OverrideShell is used for shell windows that completely bypass the window manager, for example, PopupMenu shells. Classes OverrideShell inherits behavior and resources from Core, Composite, and Shell. The class pointer is overrideShellWidgetClass. The class name is OverrideShell. New Resources OverrideShell defines no new resources, but overrides the XmNoverrideRedirect and XmNsaveUnder resources in the Shell class. Inherited Resources OverrideShell inherits behavior and resources from the following superclasses. For a complete description of each resource, refer to the reference page for that superclass. The following table defines a set of widget resources used by the programmer to specify data. The programmer can also set the resource val- ues for the inherited classes to set attributes for this widget. To reference a resource by name or by class in a .Xdefaults file, remove the XmN or XmC prefix and use the remaining letters. To specify one of the defined values for a resource in a .Xdefaults file, remove the Xm prefix and use the remaining letters (in either lowercase or uppercase, but include any underscores between words). The codes in the access column indicate if the given resource can be set at creation time (C), set by using XtSetValues (S), retrieved by using XtGetValues (G), or is not applicable (N/A). +-----------------------------------------------------------------------------------------------------+ | | Shell Resource Set | | | |Name | Class | Type | Default | Access | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNallowShellResize | XmCAllowShellResize | Boolean | False | CG | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNcreatePopupChildProc | XmCCreatePopupChildProc | XtCreatePopupChildProc | NULL | CSG | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNgeometry | XmCGeometry | String | NULL | CSG | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNoverrideRedirect | XmCOverrideRedirect | Boolean | True | CSG | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNpopdownCallback | XmCCallback | XtCallbackList | NULL | C | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNpopupCallback | XmCCallback | XtCallbackList | NULL | C | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNsaveUnder | XmCSaveUnder | Boolean | True | CSG | +------------------------+-------------------------+------------------------+----------------+--------+ |XmNvisual | XmCVisual | Visual * | CopyFromParent | CSG | +------------------------+-------------------------+------------------------+----------------+--------+ +------------------------+-------------------------+------------------------+----------------+--------+ +-----------------------------------------------------------------------+ | | Composite Resource Set | | | |Name | Class | Type | Default | Access | +------------------+-------------------+-------------+---------+--------+ |XmNchildren | XmCReadOnly | WidgetList | NULL | G | +------------------+-------------------+-------------+---------+--------+ |XmNinsertPosition | XmCInsertPosition | XtOrderProc | NULL | CSG | +------------------+-------------------+-------------+---------+--------+ |XmNnumChildren | XmCReadOnly | Cardinal | 0 | G | +------------------+-------------------+-------------+---------+--------+ +------------------+-------------------+-------------+---------+--------+ +---------------------------------------------------------------------------------------------------------------+ | | Core Resource Set | | | |Name | Class | Type | Default | Access | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNaccelerators | XmCAccelerators | XtAccelerators | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNancestorSensitive | XmCSensitive | Boolean | dynamic | G | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNbackground | XmCBackground | Pixel | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNbackgroundPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNborderColor | XmCBorderColor | Pixel | XtDefaultForeground | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNborderPixmap | XmCPixmap | Pixmap | XmUNSPECIFIED_PIXMAP | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNborderWidth | XmCBorderWidth | Dimension | 0 | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNcolormap | XmCColormap | Colormap | dynamic | CG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNdepth | XmCDepth | int | dynamic | CG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNdestroyCallback | XmCCallback | XtCallbackList | NULL | C | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNheight | XmCHeight | Dimension | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNinitialResourcesPersistent | XmCInitialResourcesPersistent | Boolean | True | C | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNmappedWhenManaged | XmCMappedWhenManaged | Boolean | True | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNscreen | XmCScreen | Screen * | dynamic | CG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNsensitive | XmCSensitive | Boolean | True | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNtranslations | XmCTranslations | XtTranslations | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNwidth | XmCWidth | Dimension | dynamic | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNx | XmCPosition | Position | 0 | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ |XmNy | XmCPosition | Position | 0 | CSG | +------------------------------+-------------------------------+----------------+----------------------+--------+ +------------------------------+-------------------------------+----------------+----------------------+--------+ Translations There are no translations for OverrideShell. RELATED
Composite(3), Core(3), and Shell(3). OverrideShell(library call)
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy