summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bash_experiments/README (renamed from multiprocessbash/README)2
-rwxr-xr-xbash_experiments/cmd_options.sh44
-rwxr-xr-xbash_experiments/gdb_python.py (renamed from multiprocessbash/gdb_python.py)2
-rw-r--r--bash_experiments/just_gdb (renamed from multiprocessbash/just_gdb)0
4 files changed, 46 insertions, 2 deletions
diff --git a/multiprocessbash/README b/bash_experiments/README
index 8428969..995bf9f 100644
--- a/multiprocessbash/README
+++ b/bash_experiments/README
@@ -11,5 +11,5 @@ source /path/to/foobar.py
etc, etc
THE solution:
-gnome-terminal -- "gdb -x gdb_python.py" & gnome-terminal -- "qemu-system-x86_64"
+gnome-terminal -- "gdb -x gdb_python.py" && gnome-terminal -- "qemu-system-x86_64"
diff --git a/bash_experiments/cmd_options.sh b/bash_experiments/cmd_options.sh
new file mode 100755
index 0000000..e1b5656
--- /dev/null
+++ b/bash_experiments/cmd_options.sh
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+echo $0
+echo $1
+
+Help() {
+ echo "Add description of the script functions here."
+ echo
+ echo "Syntax: scriptTemplate [-g|h|v|V]"
+ echo "options:"
+ echo "g Print the GPL license notification."
+ echo "h Print this Help."
+ echo "v Verbose mode."
+ echo "V Print software version and exit."
+ echo
+}
+
+Name=World
+
+#
+# The while-done structure defines a loop that executes once for each option
+# in the getopts - option structure. The ":h" string - which requires the quotes
+# - lists the possible input options that will be evaluated by the case - esac
+# structure. Each option listed must have a corresponding stanza in the case statement.
+# exit;; exits from the program without executing any more code even if some
+# exists. The option processing loop is also terminated, so no additional
+# options would be checked
+while getopts ":hn:" option; do
+
+ case $option in
+ h) # display Help
+ Help
+ exit;;
+ n) # Enter a name
+ Name=$OPTARG;;
+ \?) # invalid option
+ echo "Error: Invalid option"
+ echo $option
+ exit;;
+ esac
+
+done
+
+echo "Hello $Name"
diff --git a/multiprocessbash/gdb_python.py b/bash_experiments/gdb_python.py
index a3df392..e5f5f7e 100755
--- a/multiprocessbash/gdb_python.py
+++ b/bash_experiments/gdb_python.py
@@ -1,4 +1,4 @@
#!/usr/bin/python
print("khlkjh")
-gdb.execute("quit")
+#gdb.execute("quit")
diff --git a/multiprocessbash/just_gdb b/bash_experiments/just_gdb
index ad2f8e5..ad2f8e5 100644
--- a/multiprocessbash/just_gdb
+++ b/bash_experiments/just_gdb