summaryrefslogtreecommitdiff
path: root/pwgrep.sh
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-01-14 12:09:17 +0000
committerPaul Buetow <paul@buetow.org>2011-01-14 12:09:17 +0000
commit88d5a6f6a1d620b6f3f600c7057cf26591bae559 (patch)
treee4156e98a7a24392bbf7b2bb6c1dbf52a0693493 /pwgrep.sh
parent1e2a9662b78e925a845df439fedeec47e36e891e (diff)
pwhelp prints version
Diffstat (limited to 'pwgrep.sh')
-rwxr-xr-xpwgrep.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/pwgrep.sh b/pwgrep.sh
index 24b78d6..db67d83 100755
--- a/pwgrep.sh
+++ b/pwgrep.sh
@@ -42,6 +42,10 @@ function source_config () {
fi
}
+function pwgrep_version () {
+ sed -n '/# pwgrep v/ { s/# //; p; q; }' $0
+}
+
function configure () {
# Reading the current configuration
source_config
@@ -247,6 +251,7 @@ function fwipe () {
}
function pwhelp () {
+ info $(pwgrep_version)
info Possible operations are:
cat <<END
fwipe <FILE> - Wiping a file