Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81281 / c2html / executeProgram.sh
diff options
context:
space:
mode:
Commit5240ae0fff4cbff28e6a852606f1dc3096d8b8bf (patch)
Author
 YanaRG <alexkolbeim@gmail.com>
2018-10-17 21:54:55 +0300
Committer
 Martin Dobrev <martindobrev0@gmail.com>
2018-10-17 21:54:55 +0300
Files2dc1f0f4d5fb72a7ae812ee8d8db19f63949a10b /homework/81281/c2html/executeProgram.sh
IPL-5240ae0fff4cbff28e6a852606f1dc3096d8b8bf.tar
IPL-5240ae0fff4cbff28e6a852606f1dc3096d8b8bf.tar.gz
IPL-5240ae0fff4cbff28e6a852606f1dc3096d8b8bf.zip
Parentf530ae1938494a31de7c6766021fa62525f10ef9 (diff)
Adding first HW to repo. (#7)
* Create README.md * Initial commit * Initial commit * Create README.md * Rename homework/81281/c2html.pl to homework/81281/c2html/c2html.pl * Rename homework/81281/test.c to homework/81281/c2html/test.c * Update README.md * Update README.md * Update c2html.pl * Update c2html.pl * Update c2html.pl * Update README.md * Update c2html.pl * Update test.c * Create executeProgram.sh * Update README.md
1 files changed, 12 insertions, 0 deletions
-rw-r--r--homework/81281/c2html/executeProgram.sh12
diff --git a/homework/81281/c2html/executeProgram.sh b/homework/81281/c2html/executeProgram.sh
new file mode 100644
index 0000000..bc02714
--- /dev/null
+++ b/homework/81281/c2html/executeProgram.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+echo -n "Please enter the name of the C file you wish to highlight:"
+read fileName
+echo $fileName
+if ! [[ $fileName == *.c\n ]]; then
+ base=`pwd`"/c2html.pl"
+ PL=swipl
+ exec $PL -q -f "$base" "$fileName"
+else
+ echo "Not a correct C filename!"
+fi