From 27fdb43e71854a18bd02e7f937b83c1fb7567849 Mon Sep 17 00:00:00 2001 From: "C. 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(-) (limited to 'bin') 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 <