I have a huge file (over 30mb) that I am processing through with perl. I am pulling out a list of filenames and placing it in an array called @reports.
I am fine up till here. What I then want to do is go through the array and find any duplicates. If there is a duplicate, output it to the screen.... (3 Replies)
Hello,
I can remove duplicate entries in a file by:
sort File1 | uniq > File2
but how can I remove duplicates without sorting the file?
I tried cat File1 | uniq > File2 but it doesn't work
thanks (4 Replies)
I have many files that I need to sort each week. I know how to do in Unix, but for this task it appears best to do native inside an existing perl program. So, simplified, I have a file similar to the following:
Joe_________12_Main_St__A001________LX
Benny_______5_Spring____A002________LX... (5 Replies)
I am trying to show how many users are logged into one of my systems. Using who -q it gives me a user count, but some users are logged in multiple times.
Is there any easy parameter that I can use to ignore/eliminate these duplicates??
Thanks (9 Replies)
Hi,
I have a file in this format:
a b c d e
a b c d e
a b c d e
i need perl script to sort 2nd column in alphabatical order
The script i use is
#!/usr/bin/perl
my @words=<>;
foreach(sort mysort @words) {
print; (4 Replies)
Hi all,
Not sure if this should be in the programming forum, but I believe it will get more response under the Shell Programming and Scripting FORUM.
Am trying to write a customized df script in Perl and need some help with regards to using arrays and file handlers.
At the moment am... (3 Replies)
Good morning,
I need some help with getting rid of newlines with the output from a MYSQL query and putting the information into the right format that I need.
Here is the script as it is today:
#!/usr/bin/perl
my $uda = system("/opt/incontrol/mysql/bin/mysql -u root -ppassword... (2 Replies)
Hey guys,
I have started to learn perl recently because of a position I took. They want me to master perl and I've been reading books and practicing myself.
Basically I,m having my perl script run through a text pad and give the output in a special way
e.g
input
deviceconfig {
... (5 Replies)
Hi folks,
I have a log file in the below format and trying to get the output of the unique ones based on mnemonic IN PERL.
Could any one please let me know with the code and the logic ?
Severity Mnemonic Log Message
7 CLI_SCHEDULER Logfile for scheduled CLI... (3 Replies)
I have a large database which has the following structure
a=b
where a is one language and b is the other and = is the delimiter
Since the data treats of language, homographs occur i.e. the same word on the left hand side can map in two different entries to two different glosses on the right... (3 Replies)
Discussion started by: gimley
3 Replies
LEARN ABOUT LINUX
wrap-and-sort
WRAP-AND-SORT(1) General Commands Manual WRAP-AND-SORT(1)NAME
wrap-and-sort - wrap long lines and sort items in Debian packaging files
SYNOPSIS
wrap-and-sort [options]
DESCRIPTION
wrap-and-sort wraps the package lists in Debian control files. By default the lists will only split into multiple lines if the entries are
longer than 80 characters. wrap-and-sort sorts the package lists in Debian control files and all .install files. Beside that wrap-and-sort
removes trailing spaces in these files.
This script should be run in the root of a Debian package tree. It searches for control, control.in, copyright, copyright.in, install, and
*.install in the debian directory.
OPTIONS -h, --help
Show this help message and exit.
-a, --wrap-always
Wrap all package lists in the Debian control file even if the entries are shorter than 80 characters and could fit in one line line.
-s, --short-indent
Only indent wrapped lines by one space (default is in-line with the field name).
-b, --sort-binary-packages
Sort binary package paragraphs by name.
-k, --keep-first
When sorting binary package paragraphs, leave the first one at the top. Unqualified debhelper(7) configuration files are applied to
the first package.
-n, --no-cleanup
Do not remove trailing whitespaces.
-d path, --debian-directory=path
Location of the debian directory (default: ./debian).
-f file, --file=file
Wrap and sort only the specified file. You can specify this parameter multiple times. All supported files will be processed if no
files are specified.
-v, --verbose
Print all files that are touched.
AUTHORS
wrap-and-sort and this manpage have been written by Benjamin Drung <bdrung@debian.org>.
Both are released under the ISC license.
DEBIAN Debian Utilities WRAP-AND-SORT(1)