bash format "cat" output
I'm using the --colorsel option from Xdialog and giving the output to a variable using the "cat" function.
what's happening is the Xdialog program is letting the user select a color.
Then I assigned this to a file using 2>"FILE" then I'm using the cat function to read this file into a variable. Then I echo the variable and....
The output looks like this:
244 122 255
but I need it to look like this:
244, 122, 255
Is there a way to get it to read untill a space is encountered and then assign this a variable, then read untill the next space is encountered....ext...ext....?
anyone know how to do this?
thanks in advance!!
Last edited by bendeco13; 10-29-2004 at 01:09 AM.
|