1ExtUtils::Command(3pm) Perl Programmers Reference Guide ExtUtils::Command(3pm)
2
3
4
6 ExtUtils::Command - utilities to replace common UNIX commands in Make‐
7 files etc.
8
10 perl -MExtUtils::Command -e cat files... > destination
11 perl -MExtUtils::Command -e mv source... destination
12 perl -MExtUtils::Command -e cp source... destination
13 perl -MExtUtils::Command -e touch files...
14 perl -MExtUtils::Command -e rm_f files...
15 perl -MExtUtils::Command -e rm_rf directories...
16 perl -MExtUtils::Command -e mkpath directories...
17 perl -MExtUtils::Command -e eqtime source destination
18 perl -MExtUtils::Command -e test_f file
19 perl -MExtUtils::Command -e chmod mode files...
20 ...
21
23 The module is used to replace common UNIX commands. In all cases the
24 functions work from @ARGV rather than taking arguments. This makes
25 them easier to deal with in Makefiles.
26
27 perl -MExtUtils::Command -e some_command some files to work on
28
29 NOT
30
31 perl -MExtUtils::Command -e 'some_command qw(some files to work on)'
32
33 For that use Shell::Command.
34
35 Filenames with * and ? will be glob expanded.
36
37 cat
38 cat file ...
39
40 Concatenates all files mentioned on command line to STDOUT.
41
42 eqtime
43 eqtime source destination
44
45 Sets modified time of destination to that of source.
46
47 rm_rf
48 rm_rf files or directories ...
49
50 Removes files and directories - recursively (even if readonly)
51
52 rm_f
53 rm_f file ...
54
55 Removes files (even if readonly)
56
57 touch
58 touch file ...
59
60 Makes files exist, with current timestamp
61
62 mv
63 mv source_file destination_file
64 mv source_file source_file destination_dir
65
66 Moves source to destination. Multiple sources are allowed if des‐
67 tination is an existing directory.
68
69 Returns true if all moves succeeded, false otherwise.
70
71 cp
72 cp source_file destination_file
73 cp source_file source_file destination_dir
74
75 Copies sources to the destination. Multiple sources are allowed if
76 destination is an existing directory.
77
78 Returns true if all copies succeeded, false otherwise.
79
80 chmod
81 chmod mode files ...
82
83 Sets UNIX like permissions 'mode' on all the files. e.g. 0666
84
85 mkpath
86 mkpath directory ...
87
88 Creates directories, including any parent directories.
89
90 test_f
91 test_f file
92
93 Tests if a file exists
94
95 dos2unix
96 dos2unix files or dirs ...
97
98 Converts DOS and OS/2 linefeeds to Unix style recursively.
99
101 Shell::Command which is these same functions but take arguments nor‐
102 mally.
103
105 Nick Ing-Simmons "ni-s@cpan.org"
106
107 Currently maintained by Michael G Schwern "schwern@pobox.com".
108
109
110
111perl v5.8.8 2001-09-21 ExtUtils::Command(3pm)