I know this is possible
if (do shell script "echo \"hello how are you\"") contains "hello" then
set x to (do shell script "echo \"hello how are you\"")
end if
But what I want to do is more along the lines of this
if (do shell script "echo \"hello how are you\"") contains "hello" then set x to result
The idea here is kepping the shell call down to 1 instance. And yes I know I could also do this
set y to (do shell script "echo \"hello how are you\"")
if y contains "hello" then set x to y
but I like 1 liners