manpp: add support for .EX and .EE code blocks
[rofl0r-hardcore-utils.git] / rmv.c
blob21f83cdec006a1d1836eefbb936678fecb3d10dd
1 #include <stdio.h>
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);
7 return 1;
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");
14 return ret *-1;