summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xquotehostinfo16
1 files changed, 7 insertions, 9 deletions
diff --git a/quotehostinfo b/quotehostinfo
index c014e28..f6cf064 100755
--- a/quotehostinfo
+++ b/quotehostinfo
@@ -1,10 +1,8 @@
#!/bin/sh
-fil=/tmp/quotehostinfo$$
-echo compiled: $(date) > $fil
-make -s tellcc >> $fil
-
-echo host: $(uname -m) $(uname -s) $(uname -r) >> $fil
-gcc -v 2>&1 | tail -1 >> $fil
-
-echo \"$(cat $fil | sed 's/.*/&\\\\n/')\" | sed 's/\\n /\\n/g'
-rm $fil
+printf '"compiled: %s\\n%s\\nhost: %s %s %s\\n%s"\n' \
+ "$(date)" \
+ "$(make -s tellcc)" \
+ "$(uname -m)" \
+ "$(uname -s)" \
+ "$(uname -r)" \
+ "$(gcc -v 2>&1 | tail -1)"