projects
/
dotfiles
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
ls -l alias.
[dotfiles]
/
.bash_is
1
#!/bin/sh
2
# my weird function file to check if
3
4
5
is_empty_string
() {
6
local
var
=
$1
7
8
[[
-z
$var
]]
9
}
10
11
is_not_empty_string
() {
12
local
var
=
$1
13
14
[[
-n
$var
]]
15
}
16
17
is_file
() {
18
local
file
=
$1
19
20
[[
-f
$file
]]
21
}
22
23
is_not_file
() {
24
!
is_file
$1
;
25
}
26
27
is_not_empty_file
() {
28
local
file
=
$1
29
30
[[
-s
$file
]]
31
}
32
33
is_empty_file
() {
34
!
is_not_empty_file
$1
;
35
}
36
37
is_dir
() {
38
local
dir
=
$1
39
40
[[
-d
$dir
]]
41
}
42
43
is_not_dir
() {
44
!
is_dir
$1
;
45
}
46
47
is_not_empty_dir
() {
48
local
dir
=
$1
49
50
[[
-s
$dir
]]
51
}
52
53
is_empty_dir
() {
54
!
is_not_empty_dir
$1
;
55
}