05-15-2011
Given that this is for an assignment, I'll only make a few suggestions that should allow you to figure it out.
First, check out the man page for the who command. This should help with your first requirement.
Secondly, ps -e probably isn't going to give you enough information based on your requirements. Again check the man page, particularly the -o option. This will be key in meeting the second requirement of having your sort field be the first column.
Yes, piping the output of the ps command through the sort and head commands will indeed give you the desired output for the last part of your assignment, so you are on the right track. Right now you need to tailor the ps command to generate the needed data in the output.
Man pages are nicely linked from the unix.com site (see the top menu bar) for a fair few number of UNIX flavours. This should make getting a handle on these commands easier.
Hope this helps to get you going again.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Are there any system sumary tools for Linux? What are some good ones for Solaris and HP-Ux? (2 Replies)
Discussion started by: vader
2 Replies
2. Shell Programming and Scripting
Folks,
I have multiple files in a folder containing some information (there is around 100 of them). What I would like to do would be able to import some of the information into a summary text file so that it will be easier to read a glance.
The name of the files all start with the naming... (4 Replies)
Discussion started by: lodey
4 Replies
3. Shell Programming and Scripting
Can anybody help me to write a shell script to login interactive system
once u open a connection using telnet it will ask for
USERCODE:
PASSWORD:
DOMAIN: (1 Reply)
Discussion started by: sudhakaryadav
1 Replies
4. UNIX for Dummies Questions & Answers
Hi
I need to put together a script that will search certain tables in a db and send that data to a csv file.
Basically I am importing data to a db and I want to write a script to check that all information was imported correctly.
Thank you (1 Reply)
Discussion started by: ladyAnne
1 Replies
5. Shell Programming and Scripting
Hello!
Sorry, for my not so perfect english!
I want to stop bash shell script execution until any key is pressed.
This line in a bash shell script
read -n1 -r -p "Press any key to continue..." key
produces this error
When I run this from the command line
usera@lynx:~$ read... (4 Replies)
Discussion started by: linuxinho
4 Replies
6. SuSE
QUESTION:
Write shell script using menu-driven approach to show various system configuration like
1) Currently logged user and his logname
2) Your current shell
3) Your home directory
4) Your current path setting
5) Your current working directory
6) Show Currently logged number of... (1 Reply)
Discussion started by: bboyjervis
1 Replies
7. OS X (Apple)
hello,
I have installed on my MacBookPro Ubuntu via Boot Camp, but bootcamp has deletet that MacOS partion and created just one new and installed ubuntu.
Now I can not install MacOS 10 from the DVD, the gray screen comes when I use the "C" key during the boot process. it starts booting... (2 Replies)
Discussion started by: ingwio
2 Replies
8. Shell Programming and Scripting
Hi,
I am using solaris OS 10 and Bash shell.I need a script which will compare the two directories and produces the output.
Step 1: In detail say suppoose I have machine one and have a directory dir1. Script should iterate through the directories and subdirectories inside and produce the output... (10 Replies)
Discussion started by: muraliinfy04
10 Replies
9. UNIX for Dummies Questions & Answers
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
10. Shell Programming and Scripting
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
LEARN ABOUT CENTOS
drop_text_search_template
DROP TEXT SEARCH
TEMPLATE(7) PostgreSQL 9.2.7 Documentation DROP TEXT SEARCH TEMPLATE(7)
NAME
DROP_TEXT_SEARCH_TEMPLATE - remove a text search template
SYNOPSIS
DROP TEXT SEARCH TEMPLATE [ IF EXISTS ] name [ CASCADE | RESTRICT ]
DESCRIPTION
DROP TEXT SEARCH TEMPLATE drops an existing text search template. You must be a superuser to use this command.
PARAMETERS
IF EXISTS
Do not throw an error if the text search template does not exist. A notice is issued in this case.
name
The name (optionally schema-qualified) of an existing text search template.
CASCADE
Automatically drop objects that depend on the text search template.
RESTRICT
Refuse to drop the text search template if any objects depend on it. This is the default.
EXAMPLES
Remove the text search template thesaurus:
DROP TEXT SEARCH TEMPLATE thesaurus;
This command will not succeed if there are any existing text search dictionaries that use the template. Add CASCADE to drop such
dictionaries along with the template.
COMPATIBILITY
There is no DROP TEXT SEARCH TEMPLATE statement in the SQL standard.
SEE ALSO
ALTER TEXT SEARCH TEMPLATE (ALTER_TEXT_SEARCH_TEMPLATE(7)), CREATE TEXT SEARCH TEMPLATE (CREATE_TEXT_SEARCH_TEMPLATE(7))
PostgreSQL 9.2.7 2014-02-17 DROP TEXT SEARCH TEMPLATE(7)