Using the last, uniq, sort and cut commands, determine how many times the different users have logged in.
I know how to use the last command and cut command...
i came up with last | cut -f1 -d" " | uniq
i dont know if this is right, can someone please help me... thanks (1 Reply)
how to cut for pattern in the file and then count each occurance?
say, each line has unique pattern and u want to grep but at last, you want to see how many of them occur?
say,
cut -d'\" -f15 filename | sort -? or.. do i need to use sed or something..
i need to count lets say
how... (5 Replies)
#!/bin/bash
echo "UserName PID Command"
ps -ef > ps.temp
grep '^\{2,3\}\{4\}' ps.temp > ps.temp2
cut -f1,2,8 ps.temp2
rm ps.temp*
I am having some problems with the cut command. I only want to display the UID (field 1), PID(field 2), and Command(field 8). Right now the whole ps -ef... (5 Replies)
Hi,
I have created a variable abc within my script which can have values as follows
abc = Ram,Iam
or it can be
abc = Uam
or it can be
abc = Sam,Tam,Pam
Basically it can have a max of 3 values , seperated by comma.
I want to assign these 3 values to 3 different variables
In case of... (2 Replies)
I have the following requirement.
1. I have to concatenate the 10 fixed width files.
2. sort based on first 10 characters
3. after that i have remove first 10 chacters from the file.
can you please tell me how to do it.
Thanks in Advance
Samba (1 Reply)
Hello,
I am trying, utilizing the few commands I know, to extract all records within my file that were generated in November of 2007. Each record within the file has a "date" field giving the month, day, and year (9-8-88). How do I extract those records to their own file?
Once I extract... (4 Replies)
<B>andan100:Anders:Andersson:800101-1234:TNCCC_1:TDDB46 TDDB80:berbe101:Bertil:Bertilsson:800102-1234:TNCCC_1:TDDB46 TDDB80:The top is how it looks right now I want it t look
like this under and I want it to be sorted. I have tried with cut -f -d studenter.txt and so on but it still doesnt work... (2 Replies)
Please help.
I have a file containing rows of information. The row needs to be broken down into blocks of 5 and then sorted.
Example:
10381
1042010046 ... (4 Replies)
Korn Shell
I have a file whose values are delimited using colon ( : )
$ cat test.txt
hello:myde:temp:stiker
$ cut -d: -f2,4 test.txt
myde:stikerI want field 2 and field 4 to be returned but separated by a hyphen. The output should look like
myde-stiker
How can do this ? (without awk... (11 Replies)
Discussion started by: kraljic
11 Replies
LEARN ABOUT DEBIAN
paf
PAF(1p) User Contributed Perl Documentation PAF(1p)NAME
paf - Pod Abstract Filter. Transform Pod documents from the command line.
SYNOPSIS
sh$>
paf summary /usr/bin/paf
paf add_podcmds SomeModule.pm
paf sort -heading=METHODS Pod/Abstract/Node.pm # METHODS is default
paf sort summary Pod/Abstract/Node.pm
# See Pod::Abstract::Filter::overlay
paf overlay sort cut clear_podcmds SomeClass.pm
# -p will emit pod source, instead of spawning perldoc.
paf -p sort Pod::Abstract::Node
paf -p find hoist Pod::Abstract::Node
DESCRIPTION
Paf is a small but powerful, modular Pod filter and transformation tool. It allows full round-trip transformation of Pod documents using
the Pod::Abstract library, with multiple filter chains without having to serialise/re-parse the document at each step.
Paf comes with a small set of useful filters, but can be extended by simply writing new classes in the "Pod::Abstract::Filter" namespace.
FILTERS
add_podcmds
Add explicit =pod commands at the end of each cut section, so that all pod sections are started with an =pod command.
clear_podcmds
Remove all =pod commands that are not ending cut blocks. This will clean up documents that have been reduced using the "cut" filter too.
cut
Remove all cut nodes, so that only the pod remains.
overlay
paf overlay Source.pm
For overlay to work, there must be a "begin :overlay/end :overlay" section in the Source file, with "=overlay SECTION Module" definitions
inside. The net effect is that any missing subheadings in SECTION are added from the same section in the specified Modules.
Note that this will overlay the whole subheading, INCLUDING CUT NODES, so it can add code to the source document. Use "cut" if you don't
want this.
Each overlaid section will include a "=for overlay from" marker, so that it can be replaced by a subsequent overlay from the same
file/module. These sections will be replaced in-place, so ordering of sections once first overlaid will be preserved.
unoverlay
paf unoverlay Source.pm
Strips all sections marked as overlaid and matching the overlay spec from the source.
sort
paf sort [-heading=METHODS] Source.pm
Sort all of the subheadings in the named heading (METHODS if not provided).
This will move cut nodes around with their headings, so your code will mutate. Use "cut" if you only want pod in the output.
Alternatively, you can also cause sorting of headings to occur by including "=for sorting" at the start of your section (before the first
subheading).
summary
Provide an abbreviated summary of the document. If there is a verbatim node in the body of a heading containing the heading name, it will
be considered an example and expanded as part of the summary.
find
paf find [-f=]name Source.pm
Find specific sub-sections or list items mentioning name. Used to restrict a larger document down to a smaller set that you're interested
in. If no -f is specified, then the word following find will be the search term.
uncut
paf uncut Source.pm
Convert cut nodes in the source into verbatim text. Not the inverse of cut!
number_sections
paf number_sections Source.pm
Applies simple multipart (3.1.2) section numbering to head1 through head4 headings.
Note that number_sections will currently stuff up some of the cleverness in things like summary, as the section names won't match function
names any more.
perl v5.10.1 2010-01-03 PAF(1p)