Just make sure you capture the size of each file you want (together with the filename) in the wanted function and dump them to an array. Then you can post-process the list using sort().
Hi,
I have an entry file for a perl script from which I need to remove duplicate entry.
For example:
one:two:three
one:four:five
two:one:three
must become :
one:two:three
two:one:three
The duplicate entry is only the first field. I try many options of sort system command but don't... (4 Replies)
Hi,
I have a file of names and I want perl to do a sort on this file. How can I sort this list of names using perl? I'm thinking of a command like:
@sorted = sort { lc($a) cmp lc($b) } @not_sorted # alphabetical sort
The only thing I'm sort of unsure of is, how would I get the name in my... (6 Replies)
Hi,
using awk /sed, I need to sort out the input file.
here is the example
input file===
Name= shashi | country= india | region = asia | dept= ww
Name= jon | region = asia | dept= xx
Name=sam | dept= ww
Name= anthony | country=england | dept= xx
Name= sumo | country= china
output... (3 Replies)
Hello!
I need to sort a file that is partly in English partly in Bulgarian.
The original file is an Excel file but I converted it to a tab-delimited text file. The encoding of the tab delimited file is UTF-8.
To sort the text, the script should test every line of the text file to see if... (9 Replies)
Hi All,
I'm niks, and i'm a newbie here and newbie also in perl sorry,
i'm just wondering how can i get the file from the other hostname using sftp? then after i get it i'm going to sort the file and process it one by one. sorry because i'm a newbie.
Thanks,
-niks (4 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I must write a shell script that calls two external Perl functions--one of which sorts the data in a file, and... (6 Replies)
Hello every one ,
I am just trying to sort df -h out in a particular order to differentiate SAN disks and local disks .. does any body have any script or any useful command ??
thanks in advance .. (8 Replies)
Hi
I have a file
name1 xxxxx
name1 xxxxx
name1 yyyyy
name 1 zzzzz
name1 Uniprot Id 1234
name2 sssss
name2 eeeee
name2 bengamine
name2 Uniprot Id 3456
......................and so on
I have to capture Uniprot IDs only in a separate file so that output contain only
... (20 Replies)
Discussion started by: manigrover
20 Replies
LEARN ABOUT DEBIAN
fatsort
fatsort(1) General Commands Manual fatsort(1)NAME
FATSort - FAT filesystem sorting utility
SYNOPSIS
fatsort [options] device
DESCRIPTION
FATsort sorts directory structures of FAT filesystems. Many MP3 hardware players don't sort files automatically but play them in the order
they were transmitted to the device. FATSort can help here.
OPTIONS -c This option causes FATSort to ignore the case of filenames (e.g. 'example.mp3' is equal to 'EXAMPLE.MP3').
-f Force sorting even if the device is mounted or if FATSort cannot determine if the device is mounted.
-h Shows some help information.
-i Prints some file system information of the specified device.
-l FATSort will not sort directory structures, but just print the current order.
-o type
This options specifies how FATSort will sort files and directories. type can be 'd' for directories before files (which is the
default), 'f' for files before directories, or 'a' for no differentiation between files and directories.
-n Uses natural order to sort directory structures instead of alphanumeric order. For example, an alphanumeric order would be
file123.mp3
file21.mp3
file3.mp3
and the corresponding natural order would be
file3.mp3
file21.mp3
file123.mp3.
-q FATSort will work quietly without printing additional information messages.
-r Sorts the directories in reverse order (Z-A).
-R Sorts the directories in random order.
-v Shows version information only.
The following options can be specified multiple times:
-d directory
Sort directory only
-D directory
Sort directory and all subdirectories
-x directory
Don't sort directory
-X directory
Don't sort directory and all subdirectories
-I prefix
Ignore filename prefix prefix during sorting. For example, passing option -I "the " tells FATSort to sort 'The Beatles.mp3' like
'Beatles.mp3'.
EXAMPLES
Sort FAT filesystem on an USB stick:
fatsort /dev/sda1
Sort FAT filesystem in a file:
fatsort /home/user/fat16_fs.img
Sort directory /dir1 and all subdirectories except /dir1/dirA:
fatsort /dev/sda1 -D /dir1 -x /dir1/dirA
Ignore prefixes 'a ' and 'the ' during sorting:
fatsort /dev/sda1 -I "a " -I "the "
AUTHOR
Boris Leidner <fatsort(at)formenos.de>
SEE ALSO mount(8)fsck(8)NOTES
FAT12 is not supported yet.
REPORT BUGS
Please report bugs to fatsort(at)formenos.de. Thanks.
FATSort 0.9.15 2011 fatsort(1)