Sponsored Content
Top Forums Shell Programming and Scripting I need help with a basic script Post 302150240 by EECSDAVE on Monday 10th of December 2007 05:34:24 PM
Old 12-10-2007
I need help with a basic script

a) Total number of words in the file.

b) Total number of different words in the file.

How can I use the translate and/or unique commands to accomplish this

Last edited by EECSDAVE; 12-10-2007 at 06:58 PM.. Reason: To solicit a response
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need help with basic unix script

What I am supposed to do is creat a menu with the following Find a song Find a album Sort by artist Delete a song Add a new song Quit Now the file with the song information is database Here is what I have so far #!/bin/bash #================================================= #Script Name:... (1 Reply)
Discussion started by: stp0052
1 Replies

2. Shell Programming and Scripting

Basic script?

All, I have a list of over 400 users that need certain directories created. These will be created in /users/$username on a system and I need a directory called chess under these directories that I create. Instead of me manually adding each one (mkdir /users/user1, mkdir /users/user1/chess)... (1 Reply)
Discussion started by: kjbaumann
1 Replies

3. Shell Programming and Scripting

create a basic script

Hi everybody :( :confused: :D, I need someone to help me! I have a file with 4 colunms and I would like to transform only the 4th colunm by multiplying this by a constant value (i.e 0.3047). I'm a new one using/creating basic scripts and I'm using linux redhat. The file has the following... (1 Reply)
Discussion started by: Estanislau
1 Replies

4. Shell Programming and Scripting

create a basic script

Hi everybody :( :confused: :D, I need someone to help me! I have a file with 4 colunms and I would like to transform only the 4th colunm by multiplying this by a constant value (i.e 0.3047). I'm a new one using/creating basic scripts and I'm using linux redhat. The file has the following... (1 Reply)
Discussion started by: Estanislau
1 Replies

5. Shell Programming and Scripting

Basic script question

I'm trying to approach a problem but all I'm coming up with are complex ways to manipulate the data. But still not getting the desired outcome. directory of files.... file-100-foo file-100-man file-100-chu Need to copy the files and increment the number in the file name ... (4 Replies)
Discussion started by: suphawk
4 Replies

6. Shell Programming and Scripting

Basic shell script help

Im trying to make a script that simply adds a word to the last available line in a txt file without overwriting any previous lines. Ive googled this and there are great examples but no one explain what each function does, and i dont entirely understand how it works. Basically Im looking for... (7 Replies)
Discussion started by: kylecn
7 Replies

7. UNIX for Dummies Questions & Answers

Help with basic script - not working..

Here is the script I wrote... Pls. help. #!/bin/ksh for SERVER in NEWSNYD403P NEWSNYD404P SNEWSNYD601P SNEWSNYD602P SNEWSDNY603P SNEWSNYD604P do /usr/bin/scp "/home/sam/bash.tar root@$SERVER":/tmp done Error msg I get: ./scp_script.sh: syntax error at line 3:... (2 Replies)
Discussion started by: samnyc
2 Replies

8. Shell Programming and Scripting

Need a little help with my first shell script. Basic image resize script...

Hey everyone, just now joined because I didn't want to go onto Ubuntu forums and start asking about how to write shell scripts. Seems like this is a pretty active forum for exactly what I need. I'm trying to modify a shell script I found online, the end goal is to have it find all files in the... (9 Replies)
Discussion started by: mozzles
9 Replies
RADLIST(1)							Yard Radius Manual							RADLIST(1)

NAME
radlist - lists current on-line users and per user stats SYNOPSIS
radlist [ -bhnstx ] [ -D|M|Y ] [ -F format_string ] [ -d day ] [ -m month ] [ -y year ] [ -u user ] [ -y year ] DESCRIPTION
This program gives detailed statistics for current users on line (which is the default) or any user you like. Its statistics are on a per- day/month/year base and can be used to produced useful reports. It shows on-line time and traffic, along with numbers of logins and cur- rent port usage. Its output can be largerly customized as you prefer with a suitable format string. See FORMATS section below. OPTIONS
-b Uses a brief output format. -t Uses a `traditional' tabular output format. -n Skips the header when `-t' option is used. -h Prints out usage of the command. -F -Hformat_string Define customized formats for output rows and the header. See FORMATS section below. -m month Reports statistics for month month where month is in the range 1-12. -y year Reports statistics for year year that is a four digits number. -x Shows extedend information (port information). - u user Gets a single username database entry, i.e. select a specific username to report statistics for that user only. -M -D -Y Reports statistics on a dayly/monthly/yearly basis. They should be used along with d,m,y options. If not specified current date and -M is considered. FORMATS
radlist does allow the user to have a customized output format with the `-F' command line option (see above). The program accepts and out- puts any character in a format string and parse it to find some %-prefixed one-letter tokens. Those `a la' printf tokens are substituted with corresponding entry values. Normal C substitution are performed for \, , , and \%. The list of legal % tokens follows, any oher combination is parsed and ignored. Token Value --------------------------------------------------------- %l Username %s Number of current sessions %n Total number of sessions in the period specified %t Total online time in secs %T Total online time in HH:MM:SS format %i Total input traffic in bytes %I Total input traffic in KBytes %o Total output traffic in bytes %O Total output traffic in KBytes %m Total traffic in bytes %M Total traffic in KBytes %k Mean online time per session in secs %K Mean online time per session in HH:MM:SS format %g Mean traffic per session in bytes %G Mean traffic per session in KBytes %% literal '%' No alignment decimal values are allowed in this version of format strings. FILES
/usr/logs/YEAR/user-stats These are files which constitutes the yearly radlist database. They are in binary GDBM format and collect statistics on a per user base, day by day. /usr/logs/NAS/YEAR/detail-XX These text files stores accounting information for every access server (NAS) listed in the clients file. Each user session is iden- tified by a unique session-id and these accounting files store start/stop records for every single authenticated session. Informa- tion stored in those records, but for a group of standard ones, strictly depend on the NAS model and operating system. BUGS
The -x option apparently is not working. SEE ALSO
radiusd(8), radlast(1) builddbm(8), radtest(1), radwatch(1), radius_attributes(5) AUTHOR
Francesco Paolo Lovergine <francesco@yardradius.org>. A complete list of contributors is contained in CREDITS file. You should get that file among other ones within your distribution and pos- sibly installed under /usr/docs directory COPYRIGHT
Copyright (C) 1997 Cristian Gafton. All rights reserved. Copyright (C) 1999-2004 Francesco Paolo Lovergine. All rights reserved. See the LICENSE file enclosed within this software for conditions of use and distribution. This is a pure ISO BSD Open Source License . 1.1 Aug 25, 2004 RADLIST(1)
All times are GMT -4. The time now is 07:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy