summaryrefslogtreecommitdiffstats
path: root/roles/common/files/setfunctions.sh
diff options
context:
space:
mode:
Diffstat (limited to 'roles/common/files/setfunctions.sh')
-rwxr-xr-xroles/common/files/setfunctions.sh64
1 files changed, 64 insertions, 0 deletions
diff --git a/roles/common/files/setfunctions.sh b/roles/common/files/setfunctions.sh
new file mode 100755
index 0000000..f60bbe8
--- /dev/null
+++ b/roles/common/files/setfunctions.sh
@@ -0,0 +1,64 @@
+function rebours {
+ i=$1
+ while [[ $i -ge 0 ]]
+ do
+ echo -e "\r"$i "\c"
+ sleep 1
+ i=$(expr $i - 1)
+ done
+ echo ""
+}
+
+function xtail {
+ if [ "$#" -gt 0 ]
+ then
+ gnome-terminal -e "tail -n 0 -f $@"
+ else
+ echo "Input interdit"
+ fi
+}
+
+function xless {
+ if [ "$#" -gt 0 ]
+ then
+ gnome-terminal -e "less $@"
+ else
+ echo "Input interdit"
+ fi
+}
+
+function xcat {
+ command=$@
+ gnome-terminal -e "$command"
+}
+
+function phone2 {
+ ssh-agent > /tmp/vars.txt
+ . /tmp/vars.txt
+ ssh-add ~/.ssh/xcg
+}
+
+function phone3 {
+ ssh-agent > /tmp/vars.txt
+ . /tmp/vars.txt
+ ssh-add ~/.ssh/id_rsa
+}
+
+function blocnote {
+ trsync -aPh casper@falcon:Images/bloc-notes/courant/\* ~/Images/Bloc-notes/
+}
+
+function onionlookup {
+ SUFFIX=.casperlefantom.net
+ while test $# -gt 0
+ do
+ RESULT=`dig TXT +short $1$SUFFIX`
+ if [[ $RESULT != "www.casperlefantom.net." ]]
+ then
+ echo $RESULT | sed 's/"//g'
+ else
+ echo "erreur: domaine $1 hors-zone DNS"
+ fi
+ shift
+ done
+}