How to make do shell result into a variable value

I’m sure this has been discussed before, but the search function didn’t return any answers. So any help is appreciated.

I’m trying to figure out how to send the results of a “do shell” to a variable or array. There has to be a simple way of doing this but I haven’t been able to find an answer. If anyone can give me an simple example I’d appreciate it.

for example, do shell “echo something”
and making the value of a variable equall “something” by grabbing the result of the do shell

Do you mean this?

set myVar to (do shell script "echo something")
display dialog myVar

ah, I knew it was something very simple.
Thanks

You can read more about variables here:
http://macscripter.net/faq/general.php?id=P182
http://macscripter.net/faq/general.php?id=P180
http://macscripter.net/faq/general.php?id=P185
http://macscripter.net/faq/general.php?id=P181
http://macscripter.net/faq/general.php?id=P184
http://macscripter.net/faq/general.php?id=P137