aboutsummaryrefslogtreecommitdiff
path: root/doc/ord.1
blob: ae5a8e05d655ca878f96fcd29259cb9fee2a7f48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.Dd $Mdocdate$
.Dt ORD 1
.Os
.
.Sh NAME
.Nm ord
.Nd re-order files with numeric indices
.
.Sh SYNOPSIS
.Nm
.Op Fl n Ar "number width"
.Op Fl s Ar separator
.Ar file ...
.
.Sh DESCIPTION
.Pp
.Nm
is a convenient utility for re-ordering numerically indexed files, i.e. files with names beginning with
.Ql 01.\  ,
.Ql 02.\ 
and so forth.
Among other things, it is useful for managing disk-based playlists.

Given any number of files as arguments,
.Nm
will open a temporary text file in your
.Ev EDITOR ,
in which you can re-order the files by re-ordering lines.
Save the file and exit the text editor to change the names of the files to reflect the new order.

The
.Fl n
and
.Fl s
control the format of the numeric indices expected and created by
.Nm .
Their respective default values are 2 and
.Ql .\  .

Note that
.Fl n
and
.Fl s
cannot be used to change the format of existing numeric indices.
Such functionality is not provided by
.Nm .
.Sh AUTHORS
.Pp
.Nm
is written by John Ankarström
.Aq Mt john (at) ankarstrom.se .