-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathREADME
More file actions
121 lines (89 loc) · 4.37 KB
/
README
File metadata and controls
121 lines (89 loc) · 4.37 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
These tools are written in C, bash 4, and POSIX awk.
add_times:
adds each TIME together and prints the result to stdout.
args:
prints command line arguments given in a very readable format
bar_graph:
Creates a bar graph of the categories and values in FILE(s) (or the standard
input if no files are named, or if a single hyphen (-) is given), reading the
first field as the category and the second as the value. Must be called with
bar_grap -- [OPTIONS] [FILE...] (the -- is required). See bar_graph -- -h
cfold:
Wraps input lines in each FILE (standard input if not provided), writing to
standard output. Also included (although slightly different) in awk-libs as
an example. must be called with cfold -- [OPTIONS] [FILE...] (the -- as the
first arg is required)
fah-stats:
parses the FAH log and gives useful information
fib:
prints the Nth number of the fibonacci sequence. must be compiled with -lgmp
flatten:
flattens a directory (recursively moves all files in sub-dirs to the current
dir, and deletes the sub-dirs)
getmtime:
usage: getmtime FORMAT FILE [...]
prints the mtime for each FILE given according to FORMAT. FORMAT is anything
valid for strftime(3), as well as %N, which will be replaced with FILE.
lessopen:
this script is for the LESSOPEN env var, and is an "input pipe". it allows
less to read archives, pdfs (with pdftotext), and will use lynx -dump for html
to use it, set LESSOPEN='|lessopen %s'
merge:
Merge sorted FILEs into one, and print the result to the standard output.
mycp:
copies files. instead of erring or overwriting, appends numbers to dups
(work in progress)
myunlink:
does a call to unlink(2), prints errno and strerr(errno) if it errs
newscript:
creates a new script, adding the shebang and other things for you. see
newscript --help or usage() in the source code
noclobber:
Appends a numeric suffix to FILE, incrementing it until the resulting filename
no longer exists. Prints the result to the standard output. If FILE already has
an extension, adds the number before that extension. For example, if FILE is
`my_file.txt', a possible result would be `my_file.1.txt'. See noclobber -h,
or the comments in the source
nsplit:
numeric version of split(1) written in POSIX awk. must be called with
nsplit -- [OPTIONS] [FILE ...] (the -- is required). see nsplit -- -h, or the
comments in the source
pac_removed:
parses the pacman logfile and lists all removed packages that have not been
reinstalled. see pac_removed -- -h, or the comments in the source
psort:
sort implementation that allows prioritizing the sort by pattern.
see psort -- -h, or the comments in the source
remove_old:
removes all but the latest N files in DIR(s).
seg:
segfaults. for testing purposes.
sub:
substitutes STR for REP, treating them as literal strings. must be called
with sub -- [OPTIONS] [FILE...] (the '--' as the first argument is required)
update_gits:
Find and update all git repositories (with git pull) within DIR, or the
current working directory if DIR is not provided. By default, only check for
repositories in the highest level sub-directories. Requires GNU find.
url_encode:
uses libcurl to escape a given URL. must be compiled with -lcurl
url_decode:
uses libcurl to decode a given URL. must be compiled with -lcurl
TODO:
extend mycp, and fix bugs
Copyright Daniel Mills <dm@e36freak.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.