Edit: the call to 'echo' was missing in the script, below. (sorry)
Good morning,
To demonstrate the use of Zenity, I came up with this script-example
Code:
#!/bin/dash
IP=$(zenity --title "traceroute" --entry --text "IP or domain")
if [ "$IP" != '' ]
then
echo $(traceroute $IP) | zenity --text-info
# xterm -e "traceroute $IP"
fi
The output is not formatted, as I do not yet care. The
content however, is worrying me. After the first line from traceroute, the content of the current dircetory, where I put the script, is shown three times, then the remainder from traceroute.
Screen shot:
http://pix.toile-libre.org/upload/img/1454742731.png
A call to traceroute in a terminal-emulator looks normal, and you can replace traceroute by whois in the above script to get the same ugly result, but at least no surprises. If there is something wrong with traceroute, I wonder why it is becoming visible only when using
redirection with $() ...
Have a nice week-end, all. And if someone knows something that I have not yet seen or should modify in my call to traceroute and zenity, please tell me.
Cheerio,
Michael