2 static int usage(const char *b0
) {
3 dprintf(2, "usage: %s oldname newname\n"
4 "renames oldname to newname.\n"
5 "there are no options, so any file, even if starting "
6 "with a dash, can be renamed.\n", b0
);
10 int main(int a
, char** b
) {
11 if(a
!= 3) return usage(b
[0]);
12 int ret
= rename(b
[1], b
[2]);
13 if(ret
) perror("rename");