I need help writing a bash script for the windows cygwin environment. I'm not sure if bash is the optimal tool. Perhaps perl would be better? Either would work.
I have directories whose names include the date they were created. The directory names are in the format of... (0 Replies)
Hi,
If I have a directory full of say 100 random files, and I would like to organize them, for example: FILE001, FILE002, FILE003, FILE004, etc.
How would I do this from Terminal, instead of manually changing each file? I'm using Mac OS X, if that makes a difference.
Thank you in advance... (8 Replies)
Hi ,
I have a list of files in the directory I want to sort based on the file name.
But in the middle of filename contains the number based on that I need to sort.Could you suggest me on the same?
Example filenames:
/user1$ls
RS.DEV.ISV.F1.RS.REFDATA.DATA... (1 Reply)
Sun Solaris Unix Question
Haven't been able to find any solution for this situation. Let's just say the file names listed below exist in a directory. I want the find command to find all files in this directory but at the same time I want to eliminate certain file names or files with certain... (2 Replies)
Input file:
100%ABC2 3.44E-12 USA
A2M%H02579 0E0 UK
100%ABC2 5.34E-8 UK
100%ABC2 3.25E-12 USA
A2M%H02579 5E-45 UK
Output file:
100%ABC2 3.44E-12 USA
100%ABC2 3.25E-12 USA
100%ABC2 5.34E-8 UK
A2M%H02579 0E0 UK
A2M%H02579 5E-45 UK
Code try:
sort -k1,1 -g -k2 -r input.txt... (2 Replies)
Dears,
Would you please help on following bash script:
I want to get the most recent file named alfaYYYYMMDD.gz in one directory:
for example:
in directory /tmp/
ls -ltr
alfa20130715.gz
holding.gz
alfa20130705.gz
sart.txt
merge.txt.gz
alfa20130802.gz
my result shoud be... (1 Reply)
Hello all,
I have a list of file names in a text document where each file name consists of 4 letters and 3 numbers (for example MACR119). There are 48 file names in the document (they are not in alphabetical or numerical order). I would like to reorder the list of names so that the 48th name is... (3 Replies)
Output from zipdiff GNU EAR comparison tool produces output in html divided into three sections "Added, Removed, Changed". I want the output to be sorted by jar or war file.
<html>
<body>
<table>
<tr>
<td class="diffs" colspan="2">Added </td>
</tr>
<tr><td>
<ul>... (5 Replies)
Hi all,
I have a text file similar to this:
Text
More text
Etc
Stuff
That
Is
Needed
Etc
Etc
This contains over 70 entries and each entry has several lines of text below the name in square brackets. (5 Replies)
Discussion started by: Scally
5 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)