Hi again, I think I can help you out this time: #!/bin/bash IF_ADDR=$(/usr/bin/sudo /sbin/ifconfig | \ sed -n 's/\(\ *inet\ addr:\)\([0-9.]*\).*/\2/p') xterm -fg black -bg white -hold -e echo "$IF_ADDR" So, what happens is like this: 1) ifconfig is run via sudo. 2) the ifconfig output is being run through sed, which is told not to produce any output (-n) but the result of the substitution (p), which is the second (2) matching regular expression ([0-9.]*) (my apologies) 3) the result of all this is stored as a string in variable IF_ADDR 4) the content of IF_ADDR is echoed in an xterm Apparently, you're not very familiar with bash shell quoting. Let me explain: Double quotes (" "): allow shell expansion or substitution. Straight ticks (' '): literal, no shell expansion or substitution. Back ticks (` `) or $( ): replace with the output of the enclosed command. As it happens, this has become an illustrative example of all three kinds. P.S. the script should be run in the foreground, i.e. without a trailing &. Good luck, Tim