Browse code

added sed and cat input options, for fancy inputing. (Still lacking editor-multiline support, tough

Raven authored on20/04/2015 20:35:03
Showing1 changed files
... ...
@@ -35,7 +35,18 @@ do
35 35
 done
36 36
 
37 37
   # (3) prompt user for message content, and read command line argument
38
-read -p "Message:" messageinput
38
+read -p "Message: " messageinput
39
+
40
+case $messageinput in
41
+    sed )
42
+        echo -n 'Message: '
43
+        messageinput=$(sed '/^$/q');;
44
+    cat )
45
+        echo -n 'Message: '
46
+        messageinput=$(cat);;
47
+    * ) ;;
48
+    esac
49
+
39 50
 while true
40 51
 do
41 52
       # (1) prompt user, and read command line argument