Sponsored Content
Special Forums UNIX Desktop Questions & Answers What is the way to get a total count of students and with highest marks from a file? Post 302731441 by Scott on Thursday 15th of November 2012 04:21:52 AM
Old 11-15-2012
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Count total file downloaded using FTP

Hi All, I'm developing a FTP script as below: ftp -v -n <IP_ADDRESS> << EOF user avery jSqaqUU2 lcd /directory/folder/ ascii prompt mget * bye EOF I would like to enhance the script to count the total file downloaded. For example, once the script run i want the message "Total <n>... (1 Reply)
Discussion started by: cas553
1 Replies

2. Shell Programming and Scripting

Total Count using AWK

Hi Everybody, I have the following example file... 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1 199|TST-GURGAON|GURGAON|1... (8 Replies)
Discussion started by: sraj142
8 Replies

3. Shell Programming and Scripting

Count number of character occurence but not from quotation marks

I have the following string: 31-01-2012, 09:42:37;OK;94727132638;"Mozilla/5.0 (Linux; U; Android 2.2.1)";3G;WAP;I need a script which is counting the occurrence of semicolons ( ; ) but exclude the ones from the quotation marks. In the string given as example there are 8 semicolons but the script... (3 Replies)
Discussion started by: calinlicj
3 Replies

4. UNIX for Dummies Questions & Answers

How to find count total number of pattern in a file …?

How to find count total number of pattern in a file … File contains : a.txt ------------- aaa bbb nnn ccc aaa bbb aaa ddd aaa aaa aaa aaa grep -c aaa a.txt Op: 4 ( But my requirement is should count the total no of patterns as 7 ) (4 Replies)
Discussion started by: Jitten
4 Replies

5. UNIX for Dummies Questions & Answers

In ls -l remove total count

Hi All, When i give ls -ltr i get 'total 10' like this along with files long listing. is there any option in ls command to remove this line or do we need use head -1 command only. $ls -ltr total 45 -rw-r--r-- 1 abc g1 0 Jul 17 07:20 0 -rw-r--r-- 1 abc g1 744 May 9 12:10 a -rw-r--r--... (1 Reply)
Discussion started by: HemaV
1 Replies

6. Shell Programming and Scripting

Total count in each category for given file list

I have list of file names in filename.txt below is file format >>File1 _________________________ 01~12345~Y~YES~aaaaa~can 02~23456~N~NO~bbbbb~can . . . 99~23__________________________ Need to find total count from each file depending on specific string and add them to have total count... (17 Replies)
Discussion started by: santoshdrkr
17 Replies

7. Shell Programming and Scripting

Count total duplicates

Hi all, I have found another post threads talking about count duplicate lines, but I am interested in obtain the total number of duplicates. For example: #file.txt a1 a2 a1 a3 a1 a2 a4 a5 #out 3 (lines are duplicates) Thank you! (12 Replies)
Discussion started by: mikloz
12 Replies

8. UNIX for Dummies Questions & Answers

To count total of specific character in a file and save its value to a variable

Hi all, I have a file that contains characters. How do I get total of spesific character from that file and save the count to a variable for doing for calculation. data.txt 1 2 2 2 2 3 3 4 5 6 7 8 5 4 3 4 (5 Replies)
Discussion started by: weslyarfan
5 Replies

9. Shell Programming and Scripting

Total record count of all the file present in a directory

Hi All , We need one help on the below requirement.We have multiple pipe delimited .txt file(around 100 .txt files) present on one directory.We need the total record count of all the files present in that directory without header.File format as below : ... (8 Replies)
Discussion started by: STCET22
8 Replies
mt(1)								   User Commands							     mt(1)

NAME
mt - magnetic tape control SYNOPSIS
mt [-f tapename] command... [count] DESCRIPTION
The mt utility sends commands to a magnetic tape drive. If -f tapename is not specified, the environment variable TAPE is used. If TAPE does not exist, mt uses the device /dev/rmt/0n. OPTIONS
The following options are supported: -f tapename Specifies the raw tape device. OPERANDS
The following operands are supported: count The number of times that the requested operation is to be performed. By default, mt performs command once. Multiple operations of command can be performed by specifying count. command The following available commands that can be sent to a magnetic tape drive are supported. Only as many characters as are required to uniquely identify a command need be specified. asf Specifies absolute space to count file number. This is equivalent to a rewind followed by a fsf count. bsf Back spaces over count EOF marks. The tape is positioned on the beginning-of-tape side of the EOF mark. bsr Back spaces count records. bssf Back spaces over the requested number of sequential file marks. Sequential file marks are where the file marks are one right after the other with no other blocks of any kind between the file marks. The number argument specifies how many sequential file marks to which to space. For example, bssf 4 searches backwards to the first place where there are 4 sequential file marks and positions to the BOP side of the 4th file mark. This command is not supported by all drives. eof Writes count EOF marks at the current position on the tape. weof fsf Forward spaces over count EOF marks. The tape is positioned on the first block of the file. fsr Forward spaces count records. fssf Forward spaces the over requested number of sequential file marks. Sequential file marks are where the file marks are one right after the other with no other blocks of any kind between the file marks. The number argument specifies how many sequential file marks to which to space. For example, fssf 4 searches forwards to the first place where there are 4 sequential file marks and positions after the 4th file mark. This command is not supported by all drives. load Requests drive load and thread current media. Not supported by all drives. lock Prevents media removal. nbsf Back spaces count files. The tape is positioned on the first block of the file. This is equivalent to count+1 bsfs ollowed by one fsf. seek Positions to requested logical tape position. tell Gets and prints current logical tape position. unlock Allows media removal. If count is specified with any of the following commands, the count is ignored and the command is performed only once. config Reads the drives current configuration from the driver and displays it in st.conf format. See st(7D) for defini- tion of fields and there meanings. eom Spaces to the end of recorded media on the tape. This is useful for appending files onto previously written tapes. erase Erases the entire tape. Some tape drives have option settings where only portions of the tape can be erased. Be sure to select the cor- rect setting to erase the whole tape. Erasing a tape can take a long time depending on the device and/or tape. Refer to the device specific manual for time details. forcereserve Attempts to break a SCSI II reserve issued by another initiator. When this command completes, the drive is not reserved for the current initiator, but is available for use. This command can be only be executed by those with super-user privileges. offline Rewinds the tape and, if appropriate, takes the drive unit off-line by unloading the tape. rewoffl release Re-establishes the default behavior of releasing at close. reserve Allows the tape drive to remain reserved after closing the device. The drive must then be explicitly released. retension Rewinds the cartridge tape completely, then winds it forward to the end of the reel and back to beginning-of- tape to smooth out tape tension. rewind Rewinds the tape. status Prints status information about the tape unit. Status information can include the sense key reported by the drive, the residual and retries for the last opera- tion, the current tape position reported in file number, and the number of blocks from the beginning of that file. It might also report that WORM media is loaded in that drive. EXIT STATUS
0 All operations were successful. 1 Command was unrecognized or mt was unable to open the specified tape drive. 2 An operation failed. FILES
/dev/rmt/* magnetic tape interface ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
tar(1), tcopy(1), ar.h(3HEAD), attributes(5), mtio(7I), st(7D) BUGS
Not all devices support all options. Some options are hardware-dependent. Refer to the corresponding device manual page. mt is architecture sensitive. Heterogeneous operation (that is, SPARC to x86 or the reverse) is not supported. SunOS 5.11 21 Jun 2007 mt(1)
All times are GMT -4. The time now is 02:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy