[Solved] Shell script "whoson" sorta...


 
Thread Tools Search this Thread
Homework and Emergencies Homework & Coursework Questions [Solved] Shell script "whoson" sorta...
# 1  
Old 09-08-2011
[Solved] Shell script "whoson" sorta...

Shell script "whoson"

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!

1. The problem statement, all variables and given/known data:

write a script that will tell you who is logged in the unix system here by using the names in the roster file

2. Relevant commands, code, scripts, algorithms:

finger who grep id > /dev/null

3. The attempts at a solution (include all code and scripts):

finger | cut -c1-20 | egrep -f /accounts/classes/.../roster | sort -u

4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
University of Missouri St Louis, St Louis, MO, USA, Antognoli J, CS2750

Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).

---------- Post updated at 04:41 PM ---------- Previous update was at 01:22 PM ----------

I figured it out!
# 2  
Old 09-09-2011
Very well! Congrats - and don't forget to come back to here when you made a habit out of solving your Unix questions yourself, we always appreciate new experts. ;-))

A small thing: it is a welcomed practice to post the answer once it is found to a problem you presented. This gives the people who are trying to help a chance to learn something in exchange for their offered help.

On a side note: in real-world systems "finger" (to be precise: the "fingerd" daemon, which is the server part of this protocol) is often shut down for security reasons, so in a real world-world situation you wouldn't want to rely on this service. Instead you can use "who", which only works locally and doesn't give that much information as finger, but is less of a security concern.

For more information about the inner workings on the finger protocol: RFC748 and RFC1288.

I hope this helps.

bakunin

Moderator's Comments:
Mod Comment I changed the title to reflect the status of this thread.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Shell Programming and Scripting

[Solved] Error While Using "Basename" in the Script

Hello All My Requirement is to Delete files in a particular directory based on its extension. So for that i have piece of Code down below horo=`date +%Y%m%d` logfile=/temp/log.file.$horo date >> $logfile for fulldir in 'ls -ld /temp/strs/*' do dir=`basename $fulldir` case $dir in... (3 Replies)
Discussion started by: Ajesh
3 Replies

3. Shell Programming and Scripting

"Cannot Execute" script, SunOS. [solved]

I have a script in Server A that will run a script in ServerB. #!/bin/ksh/ ssh user@server "/path/script.sh" The script permissions are as follow: -rwxrwxrwx 1 user dba 75 Jun 11 10:00 script.sh I checked the existence of 'ksh' in /bin and its there. (bash isnt) ... (0 Replies)
Discussion started by: RedSpyder
0 Replies

4. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

5. Shell Programming and Scripting

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

6. UNIX for Advanced & Expert Users

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

7. UNIX for Dummies Questions & Answers

Command Character size limit in the "sh" and "bourne" shell

Hi!!.. I would like to know what is maximum character size for a command in the "sh" or "bourne" shell? Thanks in advance.. Roshan. (1 Reply)
Discussion started by: Roshan1286
1 Replies

8. AIX

"too big" and "not enough memory" errors in shell script

Hi, This is odd, however here goes. There are several shell scripts that run in our production environment AIX 595 LPAR m/c, which has sufficient memory 14GB (physical memory) and horsepower 5CPUs. However from time to time we get the following errors in these shell scripts. The time when these... (11 Replies)
Discussion started by: jerardfjay
11 Replies

9. UNIX for Dummies Questions & Answers

No utpmx entry: you must exec "login" from lowest level "shell"

Hi I have installed solaris 10 on an intel machine. Logged in as root. In CDE, i open terminal session, type login alex (normal user account) and password and i get this message No utpmx entry: you must exec "login" from lowest level "shell" :confused: What i want is: open various... (0 Replies)
Discussion started by: peterpan
0 Replies
Login or Register to Ask a Question