Sponsored Content
Full Discussion: Find out the System users
Homework and Emergencies Homework & Coursework Questions Find out the System users Post 302505051 by ahm2008 on Wednesday 16th of March 2011 04:28:18 AM
Old 03-16-2011
Bug Find out the System users

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:
I want to create a file called Allusers that contains the list of
currently logged on users and the total number of them.
(note: it should print, The Total is: , at the end of the Allusers file)
I have made the command, and when i perform it , it show me all the users and it print the total of them. But my problem that the command doesn't save the result in the Allusers file.

2. Relevant commands, code, scripts, algorithms:

who
sort
tee
cat
echo
cat
wc

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


who | sort -t: -k1 | tee All |cat; echo Total; cat All |wc -l; rm All > Allusers


4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):

University of Newengland, Armidale, NSW, Australia
Dr.Paul Kwan, COMP170.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

AIX Unix.. number of users on system in a particular group

Does anyone know what pipe string might be used to determine how many people are logged onto an AIX system where a group ID begins with lets say 4. In other words, I am looking to query the system for the number of people currently logged onto a system that belong to any group starting with 4.... (1 Reply)
Discussion started by: afiore
1 Replies

2. UNIX for Dummies Questions & Answers

Find users using system(List them only once)

Hey, got a few questions here for anyone who can help...... Command line to - display users using the system, but count them only once. Command line to - use the lastcomm command to display how many times ive used grep in october. Command line to - list all logged on users with at least 6... (3 Replies)
Discussion started by: xBuRnTx
3 Replies

3. AIX

Default system users

Hello I have a question I have this users on my aix 5.3 box. This are a default users. lp:*:11:11::/var/spool/lp:/bin/false invscout:*:6:12::/var/adm/invscout:/usr/bin/ksh snapp:*:200:13:snapp login user:/usr/sbin/snapp:/usr/sbin/snappd ipsec:*:201:1::/etc/ipsec:/usr/bin/ksh... (2 Replies)
Discussion started by: lo-lp-kl
2 Replies

4. Shell Programming and Scripting

How can i use system users in perl for login page

Hi, I want to code a script with perl. For this, I need some knowledge. How can i use system user name(with group) and password in my login page? I will be happy if you can help me (2 Replies)
Discussion started by: tahsinaltay
2 Replies

5. Shell Programming and Scripting

Bash Help: users who are not logged into the system to display

A Newbie here, I am working on a script and am having problems with the else part of the script. I can't get the users who are not logged into the system to display on the screen with their username and the text "The user is not logged in". I am sure it is something simple and stupid, but I... (5 Replies)
Discussion started by: rchirico
5 Replies

6. UNIX for Advanced & Expert Users

Best practices with AIX system users?

All, Preliminaries: AIX 5.2 Tivoli Maestro 6.1 (9.2) I am auditing an older AIX system. As it stands, I can login remotely to the system using the Maestro application's user account. This is BAD. The administrator claims that he cannot disable the remote login, because it will... (1 Reply)
Discussion started by: Thatto
1 Replies

7. Emergency UNIX and Linux Support

List of users on an AIX system

Is there a way to generate a list of users with name, user ID, and Security Group? It is urgent for audit purposes. Please help. (5 Replies)
Discussion started by: ggayathri
5 Replies

8. UNIX for Dummies Questions & Answers

List system users and..

Hello i need fast help... script which will list only human users from /etc/passwd and find out if they have something in home. Thanks (11 Replies)
Discussion started by: mentoscz
11 Replies

9. UNIX for Dummies Questions & Answers

Users logged into the system

So I'm trying to write a single line command So I have to use last first in this command and I've figured out the format my professor wants it in, something like thislast | cut -d' ' -f1,15 | sort > check | uniq -c.... and I never can get it right, when I just last command I get something... (2 Replies)
Discussion started by: DoubleAlpha
2 Replies
SQL::Translator::Producer::TTSchema(3pm)		User Contributed Perl Documentation		  SQL::Translator::Producer::TTSchema(3pm)

NAME
SQL::Translator::Producer::TTSchema - Produces output using the Template Toolkit from a SQL schema SYNOPSIS
use SQL::Translator; my $translator = SQL::Translator->new( from => 'MySQL', filename => 'foo_schema.sql', to => 'TTSchema', producer_args => { ttfile => 'foo_template.tt', # Template file to use # Extra template variables ttargs => { author => "Mr Foo", }, # Template config options ttargs => { INCLUDE_PATH => '/foo/templates', }, }, ); print $translator->translate; DESCRIPTION
Produces schema output using a given Template Tookit template. It needs one additional producer_arg of "ttfile" which is the file name of the template to use. This template will be passed a variable called "schema", which is the "SQL::Translator::Producer::Schema" object created by the parser. You can then use it to walk the schema via the methods documented in that module. Here's a brief example of what the template could look like: database: [% schema.database %] tables: [% FOREACH table = schema.get_tables %] [% table.name %] ================ [% FOREACH field = table.get_fields %] [% field.name %] [% field.data_type %]([% field.size %]) [% END -%] [% END %] See t/data/template/basic.tt for a more complete example. The template will also get the set of extra variables given as a hashref via the "tt_vars" producer arg. You can set any of the options used to initiallize the Template object by adding a tt_conf producer_arg. See Template Toolkit docs for details of the options. (Note that the old style of passing this config directly in the producer args has been deprecated). $translator = SQL::Translator->new( to => 'TT', producer_args => { ttfile => 'foo_template.tt', ttargs => {}, tt_conf = { INCLUDE_PATH => '/foo/templates/tt', INTERPOLATE => 1, } }, ); You can use this producer to create any type of text output you like, even using it to create your own versions of what the other producers make. For example, you could create a template that translates the schema into MySQL's syntax, your own HTML documentation, your own Class::DBI classes (or some other code) -- the opportunities are limitless! Producer Args ttfile The template file to generate the output with. tt_vars A hash ref of extra variables you want to add to the template. tt_conf A hash ref of configuration options to pass to the Template object's constructor. AUTHOR
Mark Addison <grommit@users.sourceforge.net>. TODO
More template vars? e.g. [% tables %] as a shortcut for [% schema.get_tables %]. SEE ALSO
SQL::Translator. perl v5.14.2 2012-01-18 SQL::Translator::Producer::TTSchema(3pm)
All times are GMT -4. The time now is 05:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy