summaryrefslogtreecommitdiff
path: root/stat.sh
diff options
context:
space:
mode:
authorLuke <luke@lukesmith.xyz>2018-02-09 23:47:29 -0700
committerLuke <luke@lukesmith.xyz>2018-02-09 23:47:29 -0700
commit914a1bf4d895a986adaa240e857b95c7f49fed4c (patch)
tree0a600d747198fe6143b9986bb71969a0ea47b243 /stat.sh
initial commit
Diffstat (limited to 'stat.sh')
-rwxr-xr-xstat.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/stat.sh b/stat.sh
new file mode 100755
index 0000000..fa0143f
--- /dev/null
+++ b/stat.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# Gets all accounts used by offlineimaps.
+
+cat ~/.offlineimaprc | grep "^accounts =" | sed -e 's/accounts =\( \)//g;s/\(,\) /\n/g;'
+# Another option
+# Get current accounts
+#accountsline=$(cat ~/.offlineimaprc | grep ^accou | sed 's/,//g')