From 4e86032c2eb6cfc0d4da82ca29e2b27cc221fcda Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sat, 9 Jan 2021 00:47:50 -0500 Subject: Add c -t flag to print expression type Also add missing float case. --- bin/c.sh | 33 ++++++++++++++++++++++++++++++++- bin/man1/c.1 | 7 ++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/bin/c.sh b/bin/c.sh index f1143fd3..4439aaee 100644 --- a/bin/c.sh +++ b/bin/c.sh @@ -29,10 +29,12 @@ cat >&3 <" >&3;; + (t) type=1;; (?) exit 1;; esac done @@ -45,6 +47,34 @@ int main(int argc, char *argv[]) { $*; EOF +if [ -n "${type}" ]; then + cat >&3 <&3 <