LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Shell script using zenity (https://www.linuxquestions.org/questions/programming-9/shell-script-using-zenity-620754/)

sandsterother 02-13-2008 02:57 AM

Shell script using zenity
 
I'm using the following code for file selection using zenity:

pcap=$(zenity --file-selection)
echo "Pcap file:$pcap"

Displays the following o/p:

Pcap file:/home/d/test.pcap

But at the same time if I echo the o/p as:

echo "Pcap file:$pcap ready"

I'm getting the following o/p:

readyle:/home/d/test.pcap

I wanted to know how to avoid these line feeders in shell script.
same as using chomp() cmd in perl scripting.

chrism01 02-14-2008 01:16 AM

echo -n
see http://www.tldp.org/LDP/abs/html/internal.html


All times are GMT -5. The time now is 01:44 AM.