I know this seems like a stupid question.
I am trying to sort an address book. Some peole have first, middle and last names, some only have first and last names.
Eg:
Bob Hope
John Bon Jovi
etc ..
I want to sort this by last name.
I was thinking of using something like sort -k $variable... (5 Replies)
file:///C:/Users/TSHEPI%7E1.LEB/AppData/Local/Temp/moz-screenshot.pngATM@ubuntu:~$ cat numbers2 | sort -n | uniq -c
1
7 1
11 2
10 3
the 1st numbers are the counts from the command "uniq -c", which represent the number of occurrences of each in the file. The "sort -n"... (4 Replies)
Hello all -
I am to this forum and fairly new in learning unix and finding some difficulty in preparing a small shell script. I am trying to make script to sort all the files given by user as input (either the exact full name of the file or say the files matching the criteria like all files... (3 Replies)
I want to sort a file with a list of words, in order of most occuring words to least occurring words as well as alphabetically.
ex:
file1:
cat 3
cat 7
cat 1
dog 3
dog 5
dog 9
dog 1
ape 4
ape 2
I want the outcome to be:
file1.sorted:
dog 1 (12 Replies)
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Experts
I have a list of files in the directory
mysample1
mysample2
mysample3
mysample4
mysample5
mysample6
mysample7
mysample8
mysample9
mysample10
mysample11
mysample12
mysample13
mysample14
mysample15 (4 Replies)
Hello Everyone,
In one of my script, I would like to sort the decimal numbers.
For e.g.
If I have numbers like
1.0 1.1 1.2 2.0 2.1 3.0 4.0 5.0 6.0 7.0 7.1 7.10 7.2 7.3 7.4 7.5 7.6 7.7 7.8 7.9
I would like to sort them
1.0 1.1 1.2 2.0 2.1 3.0 4.0 5.0 6.0 7.0 7.1 7.2 7.3 7.4... (3 Replies)
I have a file like the following:
/vol/release
/vol/listing
/vol/trees7
/vol/toperforce
/vol/trees10
/vol/trees2
/vol/wtrain
I have tried the following:
cat file | sort -t/ -dfk3.1 -t/ -k3.6n
That did not work. What I want to do is have the file sorted so that the first... (2 Replies)
Hi Guys,
I am looking for a way to sort the output below from the "Inuse" count from Highest to Lowest. Is it possible?
Thanks in advance.
user1 0.12 0.06 0 0.12
User Inuse Pin Pgsp Virtual
Unit:... (4 Replies)
Discussion started by: jaapar
4 Replies
LEARN ABOUT PLAN9
slabtop
SLABTOP(1) User Commands SLABTOP(1)NAME
slabtop - display kernel slab cache information in real time
SYNOPSIS
slabtop [options]
DESCRIPTION
slabtop displays detailed kernel slab cache information in real time. It displays a listing of the top caches sorted by one of the listed
sort criteria. It also displays a statistics header filled with slab layer information.
OPTIONS
Normal invocation of slabtop does not require any options. The behavior, however, can be fine-tuned by specifying one or more of the fol-
lowing flags:
-d, --delay=N
Refresh the display every n in seconds. By default, slabtop refreshes the display every three seconds. To exit the program, hit q.
-s, --sort=S
Sort by S, where S is one of the sort criteria.
-o, --once
Display the output once and then exit.
-V, --version
Display version information and exit.
-h, --help
Display usage information and exit.
SORT CRITERIA
The following are valid sort criteria used to sort the individual slab caches and thereby determine what are the "top" slab caches to dis-
play. The default sort criteria is to sort by the number of objects ("o").
The sort criteria can also be changed while slabtop is running by pressing the associated character.
character description header
a number of active objects ACTIVE
b objects per slab OBJ/SLAB
c cache size CACHE SIZE
l number of slabs SLABS
v number of active slabs N/A
n name NAME
o number of objects OBJS
p pages per slab N/A
s object size OBJ SIZE
u cache utilization USE
COMMANDS
slabtop accepts keyboard commands from the user during use. The following are supported. In the case of letters, both cases are accepted.
Each of the valid sort characters are also accepted, to change the sort routine. See the section SORT CRITERIA.
<SPACEBAR>
Refresh the screen.
Q Quit the program.
FILES
/proc/slabinfo
slab information
SEE ALSO free(1), ps(1), top(1), vmstat(8)NOTES
Currently, slabtop requires a 2.4 or later kernel (specifically, a version 1.1 or later /proc/slabinfo). Kernel 2.2 should be supported in
the future.
The slabtop statistic header is tracking how many bytes of slabs are being used and is not a measure of physical memory. The 'Slab' field
in the /proc/meminfo file is tracking information about used slab physical memory.
AUTHORS
Written by Chris Rivera and Robert Love.
slabtop was inspired by Martin Bligh's perl script, vmtop.
REPORTING BUGS
Please send bug reports to <procps@freelists.org>
procps-ng June 2011 SLABTOP(1)